If you are looking for the best solution without any Plugins for WordPress Migration. This article will help you from start to the end.

Of course. All software development would be started from Localhost (or Development host in case you have a team for co-working).

Then, when the project are going to next phase. We have to deploy software to another environment and do something for data migration. This action oftens found in Testing, UAT, and Production Deployment phase.

In the same way. WordPress is software platform and they can develop on Localhost or  Development host  as prior. So, deploy to next environment as mentioned.

In case of WordPress, not difficult, but not easy. Everything which you done on WordPress under your current host they have kept some permalink already.

Posts, Media.

So, these things are steps which we success when we move WordPress from current host to the new one.

1. Export your database as .sql file on your current host

If you use phpMyAdmin, it easy, just select your WordPress database

Click ‘Export‘ on the menu and click ‘Go‘.

No need to change anything.

wordpress migration

2. Create new database on destination host and import

Still phpMyAdmin. Create ‘Database‘ at first, and make sure your database name, username and password are complete to setup to access.

Important! These 3 things are need to match with your database accessibility in the file wp-config.php

When you ready go to the new database and click ‘Import‘ on the menu. Choose your .sql file from step 1 and click ‘Go‘.

Again, ne need to change other.

wordpress migration

After ‘Go’ was clicked. Wait the system work for a while. They are working to restore your data from old database to the new.

3. Transfer WordPress files to new host

Work with FTP file transfer program. In my work, I use FileZilla. It’s free and simply.

Just connect to your new host by FTP client and transfer all WordPress files in current host to the new host

It take times. Blend your coffee and drink to see the percentage of file transfer are running progress.

4. Change sitename and home URL in the table

Login to your database management program on the new host. In case I still use phpMyAdmin.

We have to change site url manually to let WordPress on the new host know we change host URL already.

Surely, active on new database as default. Go to the table name ‘wp_option‘ or whatever prefix if you change from ‘wp’

find column ‘option_name‘ as value ‘siteurl‘ and ‘home

Update by manual in column ‘option_value‘ to be your new host url.

Incase we change from ‘http://localhost/areyoucodingenough’ to ‘https://www.areyoucodingenough.com’

wordpress migration

5. Update permalinks

Now, your site on new host are look like complete but it’s not completely 100% because as we mentioned above.

Everything which you done on the old host WordPress have kept permalinks already and we need to update to compatible with the new host.

Execute SQL command by follow;

Update guid


UPDATE wp_posts SET guid = replace(guid, '<your old site url>', '<your new site url>');

Update post_content

UPDATE wp_posts SET post_content = replace(post_content, '<your old site url>', '<your new site url>');

Update meta_value

UPDATE wp_postmeta SET meta_value = replace(meta_value, '<your old site url>', '<your new site url>') WHERE INSTR(meta_value, '<your old site url>') > 0;

6. All of WordPress Migration are done! check all webpage and links on new host.

Tips

You probably found some error happen or whatever that stop your site works done.

Don’t worry. 90% that I found it about activated plugins are work incomplete.

You just force it to deactivate by manual follow this steps;

  • Go to table ‘wp_option‘ and look for column ‘option_name’ as ‘active_plugins’
wordpress migration
  • Replace the value in this column ‘option_value’ by ‘a:0:{}’. Just copy text and pasted to replace the current. Don’t forget to commit any changing.
  • Yep! We think now your WordPress are comeback. You can login by WordPress admin and work on Backend. Then, go to Plugin and activate one by one. Keep in mind, keep your eyes on when each Plugin are activate. Switch to frontpage to check it work normally.

That all of WordPress Migration.

Feel free to comment.

1 Can I have some encouragement?
(Visited 31 times, 1 visits today)

1 Comment

  1. vidalfut21 February 7, 2021 at 6:23 PM

    Useful and easy. Thanks dude.

    Reply

Leave A Comment

Your email address will not be published.