How to Move WordPress From Local Server to Live Site

[easy-social-share counters=0 style="button"]

In order to migrate your locally developed WordPress site to a live server, you will need to make two things. 1st is the local server. We will be provided that you have a WordPress website running on local server, so you have the full access it. After that, you will need to have website hosting that also supports WordPress, so you are able to migrate your articles over.

You will need to have a FTP program or learn how to using FTP, so that you can upload your articles to the live website.
Notice: the screenshots used for in this article we are from WordPress web hosting providers which have cPanel.

Step 1: Export Local WordPress Database

The first thing that you can do is export your local WordPress data-base. We are going to make use of phpMyAdmin to do this. In case you are not very familiar by it, after that you will want to look at our information to WordPress database management using phpMyAdmin. Basically go to http://localhost/phpmyadmin/ or click your WordPress database. After that, click the Export key from the main menu bar.

In the Export Technique option choose custom, which can provide you extra choices to export your database. Select all tables to export and gzipped for compression. Scroll down to the bottom of the page or click the Go key to download and install your database.


Step 2: Uploading WordPress Files to Live Site

Then open up an FTP client and then connect with your live website. When you are in touch with your live website, you need to upload the files in the correct directory. As an example in case you want the website to be hosted on, then you certainly would like to upload all files in your public_html directory.
Then select your local WordPress files or upload them to your live server.

Step 3: Creating MySQL Database on Live Site

When your FTP client is uploading your WordPress files, you can also spend that time on importing your database to the live server. Nearly all WordPress hosting providersoffer you cPanel to handle your hosting accounts, in that case we can easily allow you to create a database using cPanel. Log in to your cPanel dashboard or click the MySQL databases icon which you can find in the databases part.

On the second screen, create a database by entering a name for your database.

After creating a database, scroll right down to MySQL users part or create and insert a pre existing user to the database. After adding the user, cPanel can take anyone to set MySQL privileges for this user. Easily grant all privileges to the user.


Step 4: Importing WordPress Database on Live Site

The next step in the process is always to import your WordPress database. Go into your cPanel dashboard, scroll down to the databases part or click phpMyAdmin. That willtake that you phpMyAdmin so you need to click the database you created earlier. phpMyAdmin shows the new database without tables. Click the Import tab in the top menu. On the import page, click select file key then choose the gzipped data-base file you saved in step 1. In the end, click the Go key at the end of the page. phpMyadmin will now import your WordPress database.


Step 5: Changing the Site URL

Now you need to change the site URL, so you can setup your live WordPress site. In your phpMyAdmin, look for the wp_options table in your database that we just imported in step 4. If you changed your database prefix, then instead of wp_options it might be prefix_ choices.
Click the browse key next to wp_options and the link that you will visit in the sidebar to open up the page with a list of fields within the wp_options table. Visit screenshot below:


Under the area options_name, you are required to try to look for siteurl. Click on the Edit Area icon that can be found at the far left at the start of the row.


Whenever you click on the edit area, an edit area windows can look. In the input box for option_value, you will find out the URL of a local install probably for example: http://localhost/test. Carefully insert that new site url on this area, as an example:
Save the area by clicking on the Go key.
After that, you will need to replicate this step for the choice name: home. The wp_options page can become a couple of pages very long, so that easily see the home tab. Usually it is on the 2nd page that you can navigate to by clicking on the pagination arrows in phpMyAdmin.
Upgrade the home link to be the just like your siteurl.

Step 6: Setting Up your Live Site

Now this time now we have imported the database, or most of our content should be uploaded, the time is now to configure WordPress. At the moment, your website must bedisplaying a mistake Establishing Database Connection mistake. To solve this, connect with your website using an FTP client or edit wp-config.php file. Provide the database name, user or password you created sooner in Step 3. Save the wp-config .php file or upload it back in your server. Look at your web site, and must be live right now.
sign in to your WordPress admin panel, and then go to Settings » General. Click on save Option. It will make sure that the website link is corrected somewhere else which needs to be.
And then go to Settings » Permalink and then click on Save to make sure that almost all post links are work good.

Step 7: Fixing Images and Broken Links by updating Paths

When you are moving a WordPress website from 1 domain to a different, and from local server to a live site, you will face broken links and missing images issue . You eitheroperate the SQL query and using the Velvet Blues WordPress plugin.
In case you can do it by using SQL, this is a basic SQL query that should solve this issue:

UPDATE wp_posts SET post_content = REPLACE(post_content, 'localhost/test/', '');

Easily go to phpMyAdmin , click your data-base then click SQL from top menu. Create this query but then don’t just forget about to change it with your own local site or live site URLs.


That’s all of the, i hope that your live site will be up and running now. Check out your website make sure that everything is working good keep in mind. For troubleshooting orqueries feel totally free to leave us a comment below and also we have to try to help you as well as we can.
In case you are working like this on a consistent basis, then we strongly recommend you will get BackupBuddy just because it will always make your daily life simple.

Submit a comment

Pin It on Pinterest