Mostly all WordPress developers create websites on localhost or subfolder on a server before going to live server. Today in this tutorial we learn step by step how to move or migrate the WordPress website form test server to LIVE OR PRODUCTION server like localhost to example.com domain and server.
Create the backup for existing website:
- Manually: If you have technical knowledge about the server and already have a live site on the server. you should create an old backup folder and shift all the folders into it compress with the help of Cpanel and download on PC. After that take MYSQL database back up with help of phpmyadmin.
- Back up with plugin: If you have not technical knowledge you can use WordPress plugins to create backup time to time for your website back up. you can find many of plugins on the internet. For example:
- All in One WP Migration
- UpdraftPlus WordPress Backup
- WP Migrate DB
Update wp folders, files, and MySql Database:
Now upload your work with help of Cpanel or FTP as a zip folder and extract it to the root folder. Now you can see your file structure like this.
After that import your new database with the help of PHPMyAdmin.
Manually Updating the WordPress config file, Home URL and Site URL:
Now turn for configuring WordPress files with new database and site URL.
- Edit your wp-config.php and update database details like Database name, DB Username, DB Password and Host Name. Follow this code
- Update siteurl and home URL in wp_options table
Now you can check your website on the browser. you can see your homepage but many times other links not working so I share you little steps to fix this bug follow these steps:
- Go to wp-admin->Settings->Permalinks
- Now for a regenerate .htaccess file set default setting and save
- Now check again your website it is working with default query string URLs
- If you want SEO friendly URLs you can set it according to your needs
Thanks for reading
If you are facing any problem with migrating your website from one server to another contact me feel free or comment below this is my pleasure if I can help you. Thanks for reading.