Subject: PHP 7 - Migration - Wordpress Admin Access
The following message was sent by our staff regarding the above subject:
Hi,
*** This information is mainly for clients in mid-migration, but can be used for other WP testing issues ***
If you're unable to access Wordpress admin after your site files have been transferred to the new server, it may be due to Wordpress itself.
Before DNS is changed (step 3) to make the new server live, you have to use the Alternate URL, which is a server backdoor to see your temporary site:
It is in your control panel and will look something like this:
http://SERVER_IP/*yourdomain.com/httpdocs/
(make sure to add the Wordpress directory to the URL if necessary, i.e. wordpress/)
If browsing to this page shows a "good looking" but partially broken page (it might say "That file is not found" but still load your site theme/colors), then you're probably all set and ready to change DNS and complete your migration. You can stop here.
If however, you need to access WP Admin to make critical changes -before- going live, then please see below. Most users who can see their partial site, should -not- need to make further changes as this is an advance technique and Wordpress is very fickle.
Browsing to that site, http://SERVER_IP/*yourdomain.com/httpdocs/wp-admin/ should show the login and have the -same- address in the browser address bar.
If it redirects to the live version of your site, i.e. http://www.yourdomain.com , then you're facing an auto-redirect.
The problem is that by design, Wordpress wants to login to the live site because your database is programmed to do this through WP Admin.
You can try to get around it, but because you cannot reach the WP Admin panel, you have to change it manually.
There are two database keys in the wp_options table which control the site route. These can be temporarily re-pointed to the Alternate URL to make your changes.
Basically, these are the steps:
- login to the Database Manager with the database username and password.
(If you do not know the password, check wp-config.php. If the connection fails, reset the password to match wp-config with the Password option in Database Admin)
- access the wp_options table
- change the keys for home (or homeURL) -and- site (or siteURL) to match your backdoor : http://SERVER_IP/*yourdomain.com/httpdocs/
* Make sure to use YOUR alternate URL as the SERVER_IP will be different
** replace yourdomain.com in this example with your site (no www)
*** If Wordpress is in a directory, make sure to include that in the path, i.e. http://SERVER_IP/*yourdomain.com/httpdocs/wordpress/
Make sure your .htaccess file is also not using a redirect to the live site, but all of these changes 'should' then allow you access to WP Admin through the new server and the backdoor:
http://SERVER_IP/*yourdomain.com/httpdocs/wp-admin/
(If you still see the live site in the address bar, it's using the old server and NOT the new server setup, and you might need further help.)
Finally, after everything is ready, you -have- to change the Home/Site back to the live site (where you ultimately want Wordpress to load your page) in WP Admin under Settings.
Please feel free to contact us again if you have any other questions or issues. Thank you for contacting us.
Best regards,
WEBMASTERS.COM
Support Team |