Changed home, siteurl, source_domain, etc. to correct domain using phpmyadmin - admin login broke

More fun on a Friday!! Ok, so I've been working on my new AWS EC2 Bitnami Ubuntu Multisite instance. I needed to replace the crazy AWS Public DNS with my network domain. I have access to the MySQL database via an SSH Tunnel, so went through all the tables merrily replacing the AWS Public DNS ec2-52-5-25-132.compute-1.amazonaws.com with myfitcodeapp.fitness. The site looks great now at http://myfitcodeapp.fitness BUT I can't login.

So I changed the MD5 password for the admin account using phpmyadmin but to no effect. Still can't login.

So I'm thinking I may have left off "http://" in one of the changes and this has broke the login function. These domain/URL changes are the only thing that's changed. I know that WP sometimes wants a domain and sometimes wants a URL so I am thinking that's a potential source of my problem.

Looking for some guidance! Thanks in advance for helping me avoid redoing everything AGAIN by terminating and launching yet another AWS instance!

  • Adam Czajczyk

    Hello Dan,

    I hope you're well today and thank you for your question!

    I admit that I'm not that familiar with AWS specifics but it seems that the site itself is working fine. That would suggest that the issue may not be related to the changes you made. However that's just a guess.

    I think you may want to try this way of setting admin password first:

    http://codex.wordpress.org/User:MichaelH/Orphaned_Plugins_needing_Adoption/Emergency

    If it doesn't help, then try again setting new password via DB (MD5) and add this lines to your "wp-confing.php" file:

    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG',true);

    These lines should be placed above the "/*That's all, stop editing.... " line. Once this is done, try logging in again a few times and let me know if you're getting any on-screen errors. Also, please look for "debug.log" file on your server in "/wp-content/" folder. if it's there, please share its content with me.

    Best regards,
    Adam

  • Dan

    Thanks Adam for the suggestions! I was able to resolve the login issue. But It turns out it was another AWS Public DNS reference issue. Turns out that in addition to the many database changes that are required, you also need to edit the wp-config.php file. There is one constant in this file that also needs to be changed from the initial AWS public DNS url to your domain.

    This constant called DOMAIN_CURRENT_SITE can be found near the bottom of the default wp-config.php file in the root directory of your WPMU install. For me this is in the /opt/bitnami/apps/wordpress/htdocs subdirectory.

    define( 'DOMAIN_CURRENT_SITE', '<change from AWS Public DNS to your domain>' );

    I made this one additional change (after making all the database changes earlier) and my administrator login was restored.

    For anyone using an AWS Bitnami WPMU AMI to launch an EC2 instance who needs/wants to change the default AWS Public DNS to your own domain, you will need to:

    1. Follow the Bitnami instructions for creating an SSH tunnel so you can run PHPMyAdmin and access your MySQL database.
    2: Follow the instructions on "moving" your site to your own domain from Wordpress.org by locating and changing the URL, domain and site references. In my case and in my database, however, I found many stored occurrences to the AWS public DNS that I needed to change. So I would suggest ignoring any instructions that say "you only need to change 3 database references". I found at least 20 references in the database on a new install with just one site that had a few sample pages.
    3. Change the constant defined above in your wp-config.php file or you will find that your admin login no longer works.

    Hope this helps!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.