Reading Time: 5 minutes

How to Move WordPress from Localhost to Production Server: Today i am going to share with you guys that how to move your WordPress From Localhost to Production Server, As you know that WordPress is Arguably the most Used CMS in the World. Nowadays 80% Website are in WordPress such as Blogs, E-commerce  Sites Etc. There are a lots of Developers often they create their Website on  Personal Computer and Local Host.

Note: there are plugins that can automate this process. This tutorial will cover the manual steps without requiring the help of a plugin.

 

How to Move WordPress from Localhost to Production Server

 

Even if your Web Host Comes from Cpanel then you have to login into the Cpanel after that click on (MySQL Databases) in the Databases Section (Cpanel)

Create new database on live server

 

Create new database user

Lets start that how create a new database user for that you will need to open next windows, You must fill the Textbox with your username and with Strong Password, Then you have to click (Create User) Button. Then you must record the username and Password Because you shill need it later.

Create new database user

For that once again Go back in the Newly Displayed Window.

 

Add user to database

Go Down or Scroll down to (Add user to database) then you have to select the user created from the user Dropdown List and you must select Database Created from the Database dropdown List.

Next you have to click the Add Button.

Add user to database

After clicking in add button on the next window, You must click to (All Privileges) Then checkbox followed by the Make Changes Button. Once again you must click to go back on the Windows that Opens.

The windows that is Displayed, You have to check Double to see that whether your database contains the user name you just created, If you are done then click on the Home Button at the Topmost Left Corner of the Page.

Add user to database

For Migrating your Database from Local host you have to Open PHPmyAdmin. or the database management program you are using already.

Located to your WordPress Database.

How to Move WordPress from Localhost to Production Server

After selecting the database you must Scroll down then Click on (Check all)

How to Move WordPress from Localhost to Production Server

After that Select with Dropdown The Menu Then Select Export.

How to Move WordPress from Localhost to Production Server

Then In the very next Screen before that ensure that the Format is on SQL after that click on go remember that you must save the exported database with the Extension (SQL).

How to Move WordPress from Localhost to Production Server

 

Importing the database

For importing the database go back to the Cpanel on your Live Server under (Databases) you must click on (PHPmyAdmin)

Importing the database

On the left pane you would see a list of databases in the Screen. From this list you have to click on the name of the database you created at the start of the tutorial and then click to “Import.” Navigate to the SQL file you saved on your local computer and import.

How to Move WordPress from Localhost to Production Server

Even-though If everything went well, it world bring you back to the phpMyAdmin main screen. Then you will be done migrating the database to the live server.

 

In the localhost, you have to open your file manager and navigate to the WordPress folder (the folder that contains the “wp-admin,” “wp-content” and “wp-includes” folders). then Compress the whole WordPress folder into a zip file.

In your cPanel in the live server, you must open the “File Manager” under the “Files” section. Then you have to Select “Document root for” and then make sure the domain you need to move your website to is selected and hit “Go”.

Move localhost files to Cpanel

Go to next page make sure that Public HTML is selected on the Left pane than you how to click on Upload.

How to Move WordPress from Localhost to Production Server

After that Navigate to the location of the compressed zip file and upload it. Once complete, then click the “Back to” link.

Your zip file at this point would be display as a file in your “public_html” folder. If it doesn’t, click “Refresh.”

How to Move WordPress from Localhost to Production Server

After you select the Zip File and click to Extract it at the Top-Left corner. If you done it then delete the Zip File.

How to Move WordPress from Localhost to Production Server

 

At the Final Step is to Edit the WP-Config.PHP File to change all local host setting to Production Settings.

Go to File Manager then go to Public HTML select the File “wp-config.php,” and click “code editor.”

Editing the WP-config File

Go to Replace the Database name with the name of the Database you created in your Cpanel also, You must change the “DB_USER” and “DB_PASSWORD” to the one that you created earlier.

How to Move WordPress from Localhost to Production Server

Check for the “WP_HOME” and “WP_SITEURL” values. If they don’t exist,then add the following lines to the wp-config.php file:

define('WP_HOME','https://your-live-url.com');
define('WP_SITEURL','https://your-live-url.com');

Remember that to change the “your-live-url” to your actual domain URL.
Then Save the WP-Confiq.PHP File and exit.

Once you done it, Then type your own domain name in the Address bar of your browser and your site must be up and Running. Check every single page of your website to go admin panel to make sure that everything is working fine.

 

Read Also: How To Fix Service Battery Message On MacBooks