Migrating website form one host to another host is a process which requires great caution, minor mistakes can lead to devastating outcomes, so you have to be really careful when migrating your wordpress site from one host to another. Admin url not working problem can show up after migration. I have already covered how to migrate your wordpress site from one host to another. You can follow these steps carefully and hopefully you will not come across any issues in this regard.
But sometimes depending on the nature of installation issues may arise, the most common issue that is discovered by many while migrating wordpress site is there admin url www.example.com/wp-admin is not accessible after complete migration.
Lets first understand why this could happen;
- You had some other setup previously (for instance, you had site on subdomain or site installed in a folder rather than public html etc etc.
- Have plugins installed that are creating conflict (Some plugins like security plugins might have changed the admin url)
- You database doesn’t reflect the home url and site url
First of all you need to check your database if it has the right entries, to do this you need to login to your phpMyAdmin account and list your database.
After accessing tables of your website’s data base you need to open up the “wp-options” table. Here in this table you will see two options site url and home url. You need to make sure that these urls represent your domain. It has to be like this; http://example.com or http://www.example.com
Once this is clear and the problem still persists, now you can move on to the next step.
Disable all plugins and try to login:
This is the easiest way to get into the admin panel, if any of the plugin installed is creating conflict it can be resolved this way.
- Go to File Manager
First step is to login to your hosting account using cpanel and login to file manager. Now go to the directory where all the wordpress files are listed.
- Go to Folder wp-content
Once you will open this folder “wp-content” you will find another folder of “plugins”
- Rename all the plugins
In plugins folder you will find all the plugins folders that are currently installed on your site. You can disable all these plugins by simply renaming all these folders. To keep it simple just put one extra letter “S” or “T” or “B” to rename all the plugins.
Once you have renamed all the plugins they will be disabled and you should be able to login back to yur site using the same url http://example.com/wp-admin
After logging in try to activate the plugins back one by one by simply renaming it to previous name. Try to keep the security and caching plugin at the end because most of the issues come from these types of plugins.
Once you have configured which plugin is creating problem, delete that plugin and try to reinstall. If this still creates conflict try to avoid using that plugin and find alternative.