Posted on



WordPress Migration from localhost machine to server

WordPress Migration from localhost machine to server

One way to speed up your website development is to build your website on your own machine. Once you finished your website the next step is to move it from your computer to a live site and share your creation with the world. In this article, we will show you how to do migration of WordPress from local machine to server.

1.Download WordPress:-

Download the WordPress file from and unzip the WordPress file in this location var/www/html.

2. Create a database :-

Create a database for WordPress installation , as well as MySQL user who has all privileges for accessing and modifying it.

For example in below image we have created one wpdb-demo database.

however on the other hand we have to provide all privileges to database user.

3. Add Database information into wp-config.php file:-

If you have problem with wp-config-sample.php file then rename it to wp-config.php, and add your database information such as database name, database username and database password. Make changes into wp-config.php file.

4. Create a database into cPanel:-

Login to cPanel and click to MySQL Databases icon in the databases section. After clicking on MySQL icon you can create a database by specifying its name.

After creating database we have to add database user and provide strong password to create database user.

Similarly as local database we have to grant all privileges to the user and click on Make Changes button.

5. Export Local WordPress Database:-

For exporting your database, simply navigate to localhost/phpmyadmin/ and select your WordPress database. After that, click Export button from the top menu bar.

6. Import Local Database on cPanel:-

Go to your cPanel, Navigate to database section and select phpMyAdmin. Go to import page and click on import tab which is on top of the menu bar. After that, click on Browse button to choose the database file created in step 5.

7. Make changes likewise local database into imported database file:-

Once you import local database file then this file should be updated with cPanel database.This changes should be done in wp-config.php file. During updation of file, Make sure you are making changes correctly otherwise connection of database will not establishes.

8. Upload WordPress Files to cPanel->public-html:-

Upload WordPress zip file to file manager->public-html and unzip WordPress file there.

9. Change URL :-

For changing WordPress URL permanent you have to change the URL on server. For this go to phpMyAdmin After that go to your created database and click on wp_options

After going through wp-options you will get your WordPress given URL, just double click on it and rename the URL.

Leave a Reply

Your email address will not be published. Required fields are marked *