We need to follow the steps below for moving website from one hosting provider to other hosting provider.
At Source Hosting
- Take backup of existing website. This will take complete backup of all your WP files plus SQL file for database. The final backup file will be in “.tar.gz” format.
At Target Hosting
- Create the new website domain. Make sure not to install any WordPress here.
- From your hosting account, You need to go to “Files” section. Then select “Import website”.
- Upload the “X.tar.gz” file here and press “import”. This will finish import of all WordPress files and a SQL script file for database. Remember here one thing that database is not created yet. So when you try to access the web site, you will get database connectivity error.
- Now, from hosting account, go to database section and Create an empty database. Select database name, User name and password. Please record these information as we need this to update “wp_config.php” file from public_html folder.
- Now, empty database is created. To import the SQL file from above step, we need to compress that SQLFILE. Make a compressed zip folder of this SQL by right click on SQLfile and selecting “send to compressed zip folder” as below.
- This will create a .ZIP file that will only that SQL file.
- From hosting account and database section, open PHPMYADMIN. This will open the PHPMYADMIN editor.
- In PHPMYADMIN editor, you need to import the SQL zip file as mentioned below.
- Once your SQL.zip is Imported, then all posts, comments will be there
- Validate your website by checking posts and comments.
- New hosting provider may ask you to update the WordPress version for better functionality, so do it after taking new fresh backup.