Move WordPress from Local Server to Live Site [Tutorial]

Move WordPress from Local Server to Live Site [Tutorial]

Creating a WordPress site locally is a smart method to speed up the development process. Because while you are developing a site you go through so many changes and you check those changes instantly. These rapid changes and updates harm your website and drain lots of internet data.

So, most of the WordPress experts suggest developing a website on a local server. Once you end perfecting your website on your own PC (Personal Computer). The next tab is to move the WordPress website live and share your all creation among the world.

From this blog, we like to share how do WordPress migrate from localhost to live server by using BackupBuddy or Duplicator.

Prerequisites

Just a few and simple requirements that you will need before you start to move local WordPress site to live server are as follows:

In order to migrate local WordPress to the live server, you need to follow a few things. Firstly, we are pretending that you have a WordPress site running on the local server, and you have full access to your site.

Further, you will need to have a domain name and a web hosting server or provider. We have a list of the Best WordPress hosting providers. So, you can select the best for you from the list.

To speed up this process, you can use Bluehost. They are an official WordPress suggested hosting provider, and they are providing our users with an exclusive 60% off discount + a free domain to you.

Lastly, you will also need to have an FTP program and must know how to use the FTP, so that you can upload your content or blog to the live site from your website.

Migrate WordPress from Local Server to Live Site

For a successful migration of WordPress from a local server to live site follow the 7 steps given below. Let’s get started migrating WordPress site.

Step #1: Export Local WordPress Database

Move WordPress Local Server to Live Site: GuideThe very first thing you need to do is export your local WordPress database. And we will be using phpMyAdmin to do that.

Now simply go to http://localhost/phpmyadmin/ and press on your WordPress database. Thereafter, press on the Export button from the top menu bar of your PC.

export wordpress from localhost to server

Thus in the Export Method option, you can pick “Quick” or “Custom” method. Custom will provide you with more options to export your database in compare to Quick. Thus we suggest picking up the Quick option and then press the Go button to download your database.

export mysql database in phpmyadmin

Step #2: Upload WordPress Files to Live Site

Now you will need to move all your site files to your live site.

For getting started, go ahead and open your FTP client and connect to your web hosting account from your PC.

Once you are connected to your live site, make sure to upload the files in the right directory of your live site. For example, if you want the site to be hosted on WordPresssite.com, then you have to upload all the files in your public_html directory.

Thereafter select all your local WordPress files and upload the same files to your live server from your PC site onto which you are working.

uploading wordpress

Step #3: Create a MySQL Database on Live Site

While your FTP client is uploading your WordPress files. You can start importing your database to the live server from your computer. Most of the WordPress hosting providers offer cPanel to manage your hosting account, so we will represent you how to develop a database using cPanel.

Further to get started, you can log-in to your cPanel dashboard and press onto the MySQL Databases icon from your PC. which can be found in the databases section of your website.

my SQL databases

On the next window of your PC, develop a database by typing a name for your database and pressing the Create Database button from your working Window.

create new database
After developing your database, bring down to the MySQL Users section and develop or create an existing user to the database of your website.

new mysql database user

After the addition of user, cPanel will move you to set MySQL privileges for that user which you have added. Simply grant all the privileges to the user by making sure to every box which is to be checked, and then press onto the Make Changes button.

all priveleges

 

Step #4: Import WordPress Database

Now start the process of import database from localhost to live server WordPress. Thus, Go to your cPanel dashboard and bring down to the databases section and press on phpMyAdmin of your working window (desktop). This step will take you to phpMyAdmin where you wish to press onto the database which you have created in Step 3. However, phpmyadmin will represent your new database with no tables to your current working window.

Press on the Import tab in the top of the menu on the import page. Press onto Choose File button and then choose the database file you have saved in Step 1.

Finally, click the Go button placed at the bottom of the window page. PhpMyadmin will now import all your WordPress database to your PC.

phpmyadmin import database

Step #5: Change the Site URL

Now, you have to change the site URL in your database from your website so that it might join with your live WordPress site which you have just developed.

In phpMyAdmin, search for the wp_options table in your database from your PC. That we just imported in step 4. If you changed your database prefix means changed your database starting, then search wp_options instead of it which might be {prefix}_options.

Press the Browse button for the next wp_options or the link that you see in the sidebar to open or reach the page with a list of fields within the wp_options table of your current working window. See a screenshot illustrated below:

browse wp option

Below the field options_name, you need to see for the site URL. Now press onto the Edit Field icon which can be found at the far left at the starting of the row of your window page.

site url

When you press the edit field, an edit field window will appear in front of you. Thus in the input box for option_value, you will look at the URL of your local install. Probably something like: http://localhost/test. Keeping the mind insert your new site URL in this field, for example: https://www.wpglobalsupport.com.

Save the field by pressing the Go button.

edit site url
Thus, you need to reptile from this step for the option name: home. The wp_options page can be a few pages long, so as fast as you can find the home tab. Basically, it is on the second page which you can navigate to by pressing on the pagination arrows in phpMyAdmin from your PC.

Step #6: Set Up Your Live Site

Here we have imported the database, and all of our content should be uploaded. It is the time to configure WordPress. This time, your site should be representing an Error Establishing Database Connection error. To fix this error, establish a connection to your website by using an FTP client and edit wp-config.php file to your website. Now provide the database name, user, and password you have developed earlier in Step 3. Thus, Save the wp-config.php file and upload it back to your server which you have or onto which you are working. Have a look at your website, and it should be live now.

Further, you need to login to your WordPress admin panel of WordPress and go to the Settings, General. Thereafter without changing anything, bring to the bottom and press the Save Changes button. This will make you sure that the site URL is corrected anywhere else that it needs to be on your website.

Thus, after that go to Settings » Permalink and press Save Changes to confirm that all the post links are working accurately.

Step #7: Fix Images and Broken Links by Updating Paths

Thus when you are migrating a WordPress site from one domain to another. Or from the local server to a live site. You will face broken links and missing images problem definitely. Thus for overcoming this problem, you can either use the SQL query or the Velvet Blues WordPress plugin.

For those who wish to do it along with SQL(structured query language). Here we have a simple SQL query that should solve out this problem:

Press UPDATE wp_posts SET post_content = REPLACE(post_content, ‘localhost/test/’, ‘yourlivesite’). And you are all set.
Evaluating it: Simply go to the phpMyAdmin. Press onto your database and then press on SQL from the top of the menu of your PC. Type this query, but do not forget to change it. With your own local site and live site URLs. Which you have developed write away the movement.

run sql

Finally all ends! Hopefully, You have successfully moved local WordPress site to live server will running smoothly without any problem. Be sure to check out your website site for as expected working.

Conclusion

Now you would have proper insight into what happens while moving a WordPress From Local Server to Live Site. WordPress allows for a lot of reliability and ease of use of it.

What’s your best method for uploading a WordPress Website From Local Server to Live Site? If you have gone through this method before, what was your experience? Please engage your experience with us through the comments!
If you are doing this on a regular basis then we highly suggest. That you get up the BackupBuddy because it will make your life much easier than all other hosts.

In case of any help related to WordPress talk to our WordPress Technical Support Team, dial our Toll-Free number + 1 844 897 0441.

Some of our Popular Blogs:



Leave a Reply