Please carefully do all the steps below when migrating the wordpress to get 100% success.

Change database preferences

Open PhpMyAdmin and follow steps below

1. Go to wp_options table or bs_options table if you have bs_ as table prefix
2. Check value of siteurl and home field in option_value column and replace the old url with the new ones.
3. Make sure you provide something like http://www.newsite.com/ in values

Update Config file

Open your wp-config file and replace prefix with your new db prefix, i.e on old server if it was wp_ and on new server it is as re_ then you should have re_ in your config file

Resolving post migrate issues

After you have done above steps website will be looking good on front but still you may encounter errors, lets fix them.


NOTE:
THE DATABASE TABLE PREFIX IS NOT JUST USED IN THE DATABASE TABLE NAMES. IT’S ALSO USED IN DATA!

Resolving Permission errors

As mentioned above the prefix is also used in data, so you need to look for prefix and change according to new one in following tables.

In the table: wp_options or yournewprefix_options
Look for option wp_user_roles or youroldprefix_user_roles and replace it with
yournewprefix_user_roles

For example if old prefix was wp_ and new prefix is re_ then you should change wp_user_roles with re_user_roles.

Next in wp_usermeta or yournewprefix_usermeta
Look for meta_key wp_capabilities or youroldprefix_capabilities and change it to
yournewprefix_capabilities

For example if your had wp_capabilities you should change it to re_capabilities where re_ is your new prefix

Resolving other issues

Look for other values in usermeta table and replace oldprefix with your new prefix, for example look for values where it is using wp_ and replace them with re_ as re is your new prefix

Your site should be working perfectly now.

Advertisements