I have exported the Joomla DB dump from Production application and imported the same production sql dump file to my development environment. Now when i launch the development site then it logs me in only with the production credentials and after logging in it redirects me to the prod site. This issue could be because of using Prod db dump in Development. so some configuration is there inside DB tables which is forcing me to use Prod credentials in Development site. Note: Dev site was working fine before updating the db file. I didnt change anything in config files.

I know there is a table in Database where the site urls are mentioned but i am not sure which table it is.

  • Took me all of 30 seconds of googling to find this link docs.joomla.org/… Does it help?
    – tink
    Commented Oct 16, 2020 at 20:42
  • Sorry if i am unable to explain my issue properly, I'll explain it again, Dev site was working fine and i wanted to replicate the prod data in dev, so i took the db dump from prod and restored it in dev.. Now when i launch the dev site, then prod login cred only works in dev site as the db dump was from prod but it takes me to the prod site itself.... So what i am doubting it that in db dump somewhere the production site url is mentioned because of which when i try to login into dev site it redirects me to prod site...
    – Daniel Raj
    Commented Oct 16, 2020 at 20:47
  • Yes. And the second method in the link to Joomla's doco tells you which table you need to modify.
    – tink
    Commented Oct 16, 2020 at 20:50
  • Please review my previous comments as i have updated that.... Moreover the issue is not with the user password but the dev site after logging in is redirecting to prod site which was working fine before db dump restoration,, so what i am doubting is that the db dump is having the prod url somewhere because of which when i logs into dev page it redirects me to prod page....
    – Daniel Raj
    Commented Oct 16, 2020 at 20:55
  • Did you copy over the configuration.php file from Production to Dev (in the Joomla root folder)? There is config data in there. The other approach would be to use Akeeba backup to take a backup of the production site and do a restore onto your development site. Commented Oct 17, 2020 at 14:11

1 Answer 1


Editing after going through comments: After looking at the plugins of Joomdle, I found out a user plugin named joomlahooks. This plugin changes the way you login to the Joomla site. there is a function named do_login inside joomdlehooks.php. Inside that function there is a redirect command

$moodle_user = JoomdleHelperContent::call_method ("user_id", $username);
// Do nothing if user does not exist in Moodle
if (!$moodle_user)
$comp_params = JComponentHelper::getParams( 'com_joomdle' );
$moodle_url = $comp_params->get( 'MOODLE_URL' );
$redirectless_sso = $comp_params->get( 'redirectless_sso' );

Inside the configuration is saved MOODLE_URL data. You need to check what is fed in that data. If you are unable to log into admin just use phpmyadmin and search for MOODLE_URL.

What I understand is you have overwritten the database where user credentials are stored with your production db dump. If you are using Joomla 3 then you need to check this table #__users where all the user credentials are stored including those of Super Users. You can filter by name Super User in your phpmyadmin. There you can change the username and password. Remember the password is md5 encrypted. So you can use some external website and generate the password. Once done try to login with new credentials and hopefully you will be able to login with your new credentials.

  • thanks for the response, but my issue is that after logging in with the credential in dev site it is redirecting me to the prod site, so my doubt is somewhere in the database the urls are mentioned. Because the only thing i did was database replication i didnt touch the config files.
    – Daniel Raj
    Commented Oct 21, 2020 at 7:32
  • Oh Sorry from your Question I understood that it was some credential issue. Did you look at this table #__redirect_links. Regarding Config files unless you manually change the url settings it wont change. Also just check this line in configuration.php file whether it has any value or is it blank public $live_site . Also please let me know if you are using any 3rd party SEF url components or plugins.
    – Amit Ray
    Commented Oct 21, 2020 at 7:42
  • Actually my question was not clear in the description my bad, i have updated the question for better understanding. Regarding your suggestion i will check on the #__redirect_links table. "public $live_site" is blank in configuration.php and i am not using any 3rd party components or plugins. I am using Joomla with Moodle. Moodle is SSO from Joomla using Joomdle connection.
    – Daniel Raj
    Commented Oct 21, 2020 at 9:20
  • Joomdle itself is a third party plugin as it doesn't come with core Joomla so that's probably the culprit. I never used Joomdle so I have no idea how it works. You need to check what changes it makes. We can help you here for core Joomla issues, but third party plugins unless one of us used it before, we cannot help.
    – Amit Ray
    Commented Oct 22, 2020 at 5:34
  • Thanks for your guidance till now Amit really appreciate. I will check if it is the Joomdle that is causing the issue, but anyhow the issue lies in the database.
    – Daniel Raj
    Commented Oct 22, 2020 at 5:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.