How To Move Localhost WordPress Site to Web hosting Server

Move Localhost WordPress Site to Web hosting Server

How To Move Localhost WordPress Site to Web hosting Server

Most of the Beginners want to start their career in Web Development phase, so they opt WordPress to start their career. Initially, they start with local WordPress site due to lack of knowledge. After acquiring some knowledge, they Move Localhost WordPress Site to Web hosting Server.

If you are familiar with HTML and CSS, you can easily learn about WordPress and create your own dream site on localhost. Once you get familiar with WordPress, you will be ready to work on the live site. For that, you have to Move Localhost WordPress Site to Web hosting Server.

Are you wondering how to Move Localhost WordPress Site to Web hosting Server?

Don’t worry; I will explain some easy steps to Move Localhost WordPress Site to Web hosting Server in this post.

Let’s start.

How to Move Localhost WordPress Site to Web hosting Server

It is very easy to Move Localhost WordPress Site to Web hosting Server. But before I tell you the steps for doing that, I will tell you the requirements to Move Localhost WordPress Site to Web hosting Server.

Requirements




  • A Local Server where the website is located
  • WordPress Web Hosting
  • FTP Program to easily upload the content into live site

So, these are the few requirements to Move Localhost WordPress Site to Web hosting Server. Let’s discuss the steps now.

Steps to Move Localhost WordPress Site to Web hosting Server
  1. Export the Database from Xampp Localhost Server

To Move Localhost WordPress Site to Web hosting Server, you need to export local XAMPP MYSQL Database. If you are unfamiliar with MySQL, follow these steps to export the Database.

  • Go to your Web Browser and Simply fill: http://localhost/phpmyadmin/
  • PhpMyAdmin Screen will appear on your Screen, Click on your Database, which you have created.
  • Search for the Export button in Menu Section.
  • Next, you have to select the Custom option, which will provide the all possible details of the database.
  • Select all the tables to export and Scroll down to the bottom of Page. Then press the Go button to download the Database.
  • Save the Database in Unique Folder.

 

  1. Upload your Live Site from WordPress Xampp Server

FTP Client is one of the helpful software to import the data files to hosting Server. When you Move Localhost WordPress Site to Web hosting Server, FTP helps to connect with the live site, when you will get connected with hosting server, make sure all the files upload into the right directory. For example, if you want the site to be hosted on yourwebsite.com, then you must have to upload all the files into the public_html directory. Then Select your WordPress Files and upload them into live Server.

  1. Import the Database into Web hosting Server

During the WordPress file transfer via FTP Client; you can create the database on the live website. Most of the WordPress hosting Provider provides the CPanel to manage your hosting account.




  • Login into Your HostGator WordPress Hosting or your other Web hosting Server. Then Go to the MySQL Database, where you have to create the Database for WordPress.
  • After the creation of the database, scroll down to MYSQL users section and create the same user to a new database. After adding the user, CPanel will ask you to set the Privileges for the user. Simply permit all the privileges to users.



  • Once you created a new database, next step is to Import your WordPress Database. After that, go to phpMyAdmin option in CPanel. A new Screen will appear where you need to click on the database that you created earlier. It displays the new database without any table. Then go to the Import option on the top menu to import the downloaded database in Step 1.

  • Press the Go button and phpMyAdmin will import to your WordPress database.
  1. Changes in Site URL

All the Configurations have been done, but one more step is still pending. Once you uploaded all the data, need to change the site URL, so you can setup your live website. In your phpMyAdmin, search the wp_options table in your database which we imported in Step 3. If you change your database prefix, then instead of wp_options it might be {prefix_options}.

  • Click on browse button next to the wp_options to open the wp_options file.

Under the field of options_name, you have to enter the Site URL. Click on the Edit field icon which can be found at the beginning of the row.

  • When you click the edit field, a new window will appear. In the Input box for option _value, you will see the URL of you local install something like http://localhost/test. Be careful while inserting your new site URL in this field, for example, https://www.seoramanarora.com/

Save the field by clicking Go button.

  • Next, you need to replicate the step for option name: home. The wp_options page can be few pages long, so find the home page tab. As general, it comes on the Second page which can navigate by click on the pagination arrows in phpMyAdmin.

Update the home page URL to be same with Site URL.

  1. Setting Up in Live Website

After the completion of all imported part including database and WordPress files, it is time to configure the WordPress. At this time, your site will display Error Established Database Connection. To fix this error, you need to connect your site to FTP Client and edit the wp-config.php file. Fill the name of database, username, and Password you created earlier in Step 1. Save the config.php file and upload it back into your Server. Visit your website and Check, your site will get live.

  1. Setting up the Permalinks
  • Go to your WordPress Admin Panel >> Dashboard >> Settings >> General. Click on the save option, It will ensure that the site URL is Corrected anywhere else that you needs to be.
  • Go to the Settings >> Permalink and click save to ensure that all the post links are working well.
  1. Fix Broken links and Image by updating Paths

Whenever you Move Localhost WordPress Site to Web hosting Server or one site from one domain to another domain to make it live, you might face the broken links and image issues. You can use the SQL query or Valvet Blues WordPress plugin. 

Code at below:

UPDATE wp_posts SET post_content = REPLACE(post_content,

'localhost/test/', 'www.yourlivesite.com/');

For beginners, who want to setup via SQL, here is a simple query that can resolve your problem.

Simply go to phpMyAdmin, go to your database and click on the SQL at the top menu. Write this query, but don’t forget to change the URL it with your own local site to live site URLs.

Note: The Screenshots used in this article are from WordPress hosting.




Final Verdict

In the nutshell, by following the above steps, you can successfully Move Localhost WordPress Site to Web hosting Server. Hence, your website will get live. Check your site and make sure everything works fine as we expected. If you are doing this on regular basis, make sure you create a backup of your data for security.

Besides, For questions and troubleshooting feel free to leave us a comment below and we are always available to help you as much as we can.

I hope you get valuable information from this article. If you like this post, don’t forget to share this with your friends. Subscribe to my blog “SEORamanArora” to get daily updates. Also, share this post with your friends. Moreover, you can keep in touch me on FacebookTumblrtwitterInstagram LinkedinGoogle+ and my  Youtube Channel.

No Comments

Post A Comment