Knowledge Base
MilesWeb / WordPress FAQ

Learn to Manually Move WordPress from Local Server to Live Site

Approx. read time : 5 min

After completing with your website customization, you will need to move your website from your computer to a live site to make it accessible to all. Let’s learn to move your WordPress website from local server to a live site with the manual method.

Step 1: Exporting Local WordPress Database

At first, export your local WordPress database using phpMyAdmin.

Navigate to http://localhost/phpmyadmin/ and click on your WordPress database. Then, from the top menu bar click on the Export button.

In the Export option, select either “Quick” or “Custom”. With Custom, you will get more options for exporting your database.

It is recommended to select Quick, and then click the Go button. This will download your database.

Step 2: Uploading WordPress Files to Live Site

After your database is downloaded, you will need to move your website files to the live site.

To start with, open the FTP client and connect to your web hosting account.

After getting connected to your live site, ensure that you upload the files in the right directory. For example, if you want to host your site on yoursite.com, then you will need to upload all the files in your public_html directory.

Choose the local WordPress files and upload them to the live server.

Step 3: Creating MySQL Database on Live Site

Start importing your database to live server, while the FTP client is uploading your WordPress files. cPanel is offered by most of the WordPress hosting providers for managing your hosting account.

At first, log in to your cPanel dashboard and click on the MySQL Databases icon located in the Databases section.

Next, enter a name for your database to create new database and click on the Create Database button.

Once you create a database, go to the MySQL Users section and create a new user or add an existing user to the database.

After this, the MySQL privileges for that user will get displayed. Here, grant all the privileges to the user by checking every box and then click on the Make Changes button.

Step 4: Importing WordPress Database on Live Site

Now, you will need to import your WordPress database.

In the cPanel dashboard, go to the Databases section and click on phpMyAdmin.

After the phpMyAdmin dashboard gets displayed, click on the database you created in Step 3. This will show your new database without any tables.

In the top menu, click on the Import tab. Once the Import page gets displayed, click on Choose File button and then select the database file saved in Step 1.

Next, click the Go button at the bottom of the page. This will import your WordPress database.

Step 5: Changing the Site URL

You will need to change the site URL in your database for connecting with the live WordPress site.

In phpMyAdmin, search for the wp_options table in your database imported in Step 4. In case, you have changed your database prefix, then instead of wp_options, you will see it as {prefix}_options.

Next to wp_options click on the Browse button or the link in the sidebar to open the page with list of fields in the wp_options table as shown below:

Search for the siteurl under the option_name. Click on the Edit icon located at the far left at the start of the row.

The Edit field window will get displayed. You will see the URL of your local install such as: http://localhost/test in the input box for option_value. Insert your new site url in this field, for example: https://howto.idigitalcamp.com/blog.

Click on the Go button to save the changes.

Repeat this step for the option_name: home. Since the wp_options page is a few pages long, so just search for the name home. Generally, you will find it on the second page.

Update the home url similar to your siteurl.

Step 6: Setting up Your Live Site

After importing the database and uploading the content, you need to configure WordPress.

If you try browsing your site now, you will get an Error Establishing Database Connection error.

This can be fixed by connecting to your website using an FTP client and editing wp-config.php file.

Here you need to provide the database name, user and password created in Step 3.

Save the wp-config.php file and upload it back to your server.

Now visit your website, and it will be live now.

Next, login to your WordPress admin panel and go to Settings » General. Scroll to the bottom and click the Save Changes button.

With this, the site URL will get corrected anywhere else where it needs to be.

Next go to Settings » Permalink and click Save Changes to check that all post links are working fine.

Step 7: Fixing Images and Broken Links by Updating Paths

When you move a WordPress site from one domain to another, or from local server to a live site, there will be broken links and missing images.

You can use the SQL query or use the Velvet Blues WordPress plugin for fixing this issue.

If you want to do it via SQL, use the below simple SQL query:

Go to phpMyAdmin, click on your database and then click on SQL from the top menu. Use this query, but replace it with your own local site and live site URLs.

That’s it, you have migrated WordPress from local server to a live site successfully!

Hope that now your live website is up and running smoothly. Browse your website and make sure that everything is working as expected. In case there are any errors, go though this guide to common WordPress errors for help troubleshooting.

Avatar
Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.

Trusted By Thousands of Clients & Big Businesses

We highly appreciate the kind and stellar feedback we receive from our customers. Delivering the best is our goal! MilesWeb is rated Excellent 4.8 out of 5 based on reviews. Read more reviews.

Excellent
Based on reviews
2 hours ago
Perfect and Valuable Server + ...
I am using MilesWeb Servers, The main thing which I getting are continuous support over everything w...
Gunjan Makwana
4 hours ago
Milesweb is superb Hosting pro...
Milesweb is superb Hosting provider ever, their Support team is amazing!!!...
Abhishek Singh
15 hours ago
Great support in great timing...
We need urgent assistance on changes in a primary domain on our client's Cpanel accounts and reached...
Riyaju Deen
21 hours ago
Best Website Hosting platform ...
I was new on MilesWeb. And needed help on multiple areas from setting up to getting started with cre...
Harshada
1 days ago
Very quick and helpful assista...
Very quick and helpful assistance. Support person listened properly and provided a nice solution....
Narendra
1 days ago
the team is very supportive th...
the team is very supportive though at times effort needs to be made to make understand the problem s...
Suree Sharma
1 days ago
I am using miles web for 3plus...
I am using miles web for 3plus years, very quick and perfect support by the team, they helped me man...
Sri Raghav
2 days ago
The service is good...
The service is good. They are answering with patience and doing the needful as soon as possible....
MR
2 days ago
Perfect and Valuable Server + ...
I am using MilesWeb Servers, The main thing which I getting are continuous support over everything w...
Gunjan Makwana
3 days ago
Very quick and helpful assista...
Very quick and helpful assistance. Support person listened properly and provided a nice solution....
Narendra
4 days ago
positively helped me with find...
positively helped me with finding insecure content on my website causing SSL to not work properly on...
Thaviraj Junglee
4 days ago
Exceptional support, Truly Pra...
I had opted for the basic wordpress hosting plan as I intended to experiment with various plug-ins. ...
Aseem Chandna