In the previous tutorial, we give step by step guide to install WordPress on your Windows computer (localhost ). Configuring WP sites in local server make your work easier and faster. When your website customization is all done in localhost, it’s time to move it to live server. Now, here in this tutorial, we will guide you to move your WordPress website from the local server to live server. Following this step by step guide, you can easily move your complete WordPress to live server.
To migrate the contents from the local server to live server, there are many migration plugins available like BackupBuddy, Duplicator and much more. You can easily transfer your website from the local server to live server using these plugins. However, in this article, we are going to show you step by step process to live your WordPress site manually.
Before starting the procedure, we want to make sure that all the prerequisites are available with you. Prerequisites include fully accessible local server (hope you have a WordPress site running on localhost), WordPress web hosting powered (must require to migrate your content to the live server) and FTP program ( to upload content on the live site).
In this tutorial, we have web hosting providers having cPanel – a Linux server. Remember if you have windows hosting they might have a software like Plesk or similar instead of cPanel.
Now here the steps begins,
Step 1. Login to your hosting cPanel
Step 2: Create Database
Now you have to create a new database for your WordPress site.
Browse to MySQL Databases.
Enter the username and password.
Remember this is a new user account that associates with a new database for your website so it’s better to note the username and password. You will need them later while configuring the
P.S Username you choose will be the name of the newly created database.
Step 3: Export your local database
Now, export your local database. Jump over http://localhost/phpmyadmin/ in your browser’s address bar.
In the left side, all the databases are listed. Select the database for your local WordPress website. Now, click on Export button on the top menu bar.
Choose the custom export method, this gives you more control over the process. Make sure all your tables should be selected and choose to gzip compression for the larger database.
Step 4: Import the database file (you’ve just exported from your PC) to the database created in your server via cPanel (PHPMyAdmin)
Again, back to the database section of your cPanel dashboard, choose phpMyAdmin and highlight your database (created earlier). When your new database appears completely empty, click on “Import” button on the top menu bar. Now click on “browse” button and choose your gzipped file.
Click on Go and it’s done.
Step 5: Upload the files (all WordPress installation files – not just theme) to your server via FTP or cPanel
In this step, open an FTP client for connecting to the live site. When you are connected, upload all your local server files and folder to the live server’s root (public_html)
Step 6: Configure wp-config.php file
Here open the wp-config.php file in the root directory and configure the following database details:
- DB_Name : “set_your_database_name”
- DB_USER: “set_your_database_user”
- DB_PASSWORD: “set_your_database_password”
- DB_HOST: “localhost”
You have to set those details as per you defined previously while creating the database. Just change the above-mentioned details only, leave others as it is and save and close the file.
Step 7: Replace the URL
This is the final step to live your WordPress site. Open your Database and find options table and then in the first and second row there are site URL and home URL where you will find the local site URL and replace those values with your live site URL.
And it’s done.
Following these easy steps, you can make your WordPress site live within few minutes. Hope this tutorial helps you get the answers you were looking for. If you have any questions or suggestions related to the topic or any, please feel free to share. I would love to hear any suggestion and recommendation from you.
We have many other WordPress learning tutorials. Stay tuned.