WPLake > Blog > Migrate WordPress Site to a Live Server : Step-by-Step Guide

Migrate WordPress Site to a Live Server : Step-by-Step Guide

Time to read: 4 mins

-

Opinions Tips and Tricks Tutorials

-

Updated 17.08.23

In this guide, we'll walk through the necessary steps to migrate WordPress and help you avoid any potential hiccups along the way.
To Migrate Wordpress is like transporting passengers on a train.

Table of Contents

To Migrate WordPress as a development site to the live server is an important step in making your website accessible to the world. While the process may seem daunting, with proper planning and execution, you can seamlessly transition your site to the live server.

Step 1: Choose a Reliable Hosting Provider

#link copied

Before you begin the migration process, it's essential to select a reliable hosting provider that meets your website's requirements. Look for a hosting company that offers good server performance, uptime guarantees, excellent customer support, and easy WordPress installation options. Make sure the chosen hosting package matches your site's needs in terms of storage, bandwidth, and scalability.

Step 2: Set Up the Live Server Environment

#link copied

Once you have a hosting provider in mind, do some research because it's important for the security of your WordPress website. Now it's time to set up your live server environment. This typically involves registering a new domain or subdomain, provisioning server space, and configuring server settings. If your hosting provider offers a one-click WordPress installation option (like Softaculous). Then take advantage of it to simplify the process of having to migrate WordPress.

Step 3: Export the Database

#link copied

Next, you need to export your WordPress development site's database. Log in to the development server's MySQL (or other database type). I prefer using the popular phpMyAdmin tool, as it offers a great Graphical User Interface (GUI). First, select your database from the list, choose 'Export' from the top tabs. Scroll down and check your tables "customize" option, choose the 'gzipped' compression, then click on the "Go" button. This action will save the 'x.tar.gz' file containing your site's database to your local machine.

Note: We recommend keeping the database tar file for a few days after launch. You may need it for some odd reason, so it's best to have it as backup.

Step 4: Transfer Files to the Live Server

#link copied

To transfer your site's files to the live server, you have a few options. One of the simplest methods is to use an FTP (File Transfer Protocol) client like FileZilla. Connect to your development site's server using the FTP credentials. You can ask you hosting company or set it up yourself via the interface. Once connected, navigate to the WordPress installation directory. Select all the files and folders, then upload them to the appropriate directory on the live server.

Migrate wordpress using Filezilla
Use FileZilla to connect to your Host via FTP

Pro Tip: Enable "View hidden files and folders" option to see all the files, including the .htaccess file.

Step 5: Import the Database

#link copied

Access the live server's database management tool, usually phpMyAdmin is provided by your hosting company. Create a new database and assign a user with all privileges to it. At this stage you may need to first setup the database with you cPanel or DirectAdmin MySQL database management tool. Continue, by selecting the newly created database and choose the "Import" option. Now 'browse' and select the .tar.gz file from your desktop. When you're ready, click "Go" to import the data into the live server's database.

Note: If you have an error while importing, carefully read what it says, usually there is a piece of the import file text that tells it to create a new database. You could remove the lines that mention "Create database" to prevent issues.

Step 6: Update WordPress Configuration

#link copied

After importing the database, it's crucial to update the WordPress configuration to reflect the live server environment. In the WordPress installation directory on the live server, locate the "wp-config.php" file. Open it in a text editor and update the database name, username, password, and host details with the ones specific to the live server.

Pro tip: Not all MySQL servers use 'localhost' companies like Hetzner use 'sql14.cpt4.host-h.net' to connect directly to MySQL.

Windows terminal used to ping domain
Use CMD prompt in Windows to ping a domain.

Step 7: Update Permalinks and Test

#link copied

Log in to the WordPress admin panel on the live server using the credentials you used on the development site. Navigate to the "Settings" menu and choose "Permalinks." Ensure the same permalink structure is selected as on the development site. Save the changes to update the permalink structure on the live server.

Finally, go ahead and explore your website on the live server to assess its functionality and confirm whether images and icons are loading properly. If nothing is visible on the frontend, you may have what is known as a White screen of death, time for some troubleshooting.

If you find that you are redirected to your development or staging site instead of the live site, you will have to manually update the 'siteurl' and 'home' entries in the 'wp_options' table in the database.

To update all your links, permalinks and similar we recommend using Better Search and Replace.

Conclusion

#link copied

As you can see, to Migrate WordPress websites to a live server doesn't have to be a complicated process. Follow these step-by-step instructions, to smoothly transition your site to the live server and make it accessible to the world. Remember to choose a reliable hosting provider, export and import the database correctly (if you see errors, read them carefully), transfer the files securely, and update the necessary configurations. With proper planning and execution, your website will be up and running on the live server in no time.

Don't forget to uncheck the "Discourage search engines from indexing this site" in your WordPress 'Reading' settings, and to go through your list for optimizing your WordPress installation. As no one enjoys using a slow website.

About the Author
Baxter Jones

Working in the web industry for over 15 years gaining experience in design,user experience and web best practices. Has a keen eye for detail and enjoys having a process when working and creating. He thinks WordPress is the best thing since sliced bread and when he’s not behind his computer he’ll be in the garden.

0 Comments

    Leave a comment

    Reply to 

    Please be considerate when leaving a comment.

    Not shown publicly

    Got it