How to move wordpress website from localhost to live server manually without plugins?

Step 1: Export your local wordpress website database

For exporting your database start your XAMMP server. Goto http://localhost/phpmyadmin/ and select your wordpress database then click export button from top menu, you will see two options first is quick-only the minimal option and the second one is custom-display all possible options. select first one quick-only the minimal options and click on go.

Step 2: Upload wordpress files on server

To move wordpress files open your FTP(Filezilla) client. Using credentials simply connect server. After that browse the root folder and upload all the wordpress files. If you want to host your website on mywebsite.com then upload all files in public_html folder. If you're not using filezilla and you don't know about filezilla open your cpanel and go to the root folder and upload zipfile and then extract it.

Step 3: Create database on server

Hosting providers give you different ways to create database on server. Some do it through phpmyadmin and some do it through cpanel. Here we are creating database using cpanel. First of all, log in to your cpanal dashboard. Click the mysql databases in the database section. Then write a database name. After creating a database go to mysql users section. In this section you can create new user or you can add an existing user to the database. In mysql privileges page select all privileges checkbox and click on make change button.

Step 4: Replace localhost website urls to the server's urls

Then open your exported localhost database in the text editor and find the localhost website urls and replace it with server's urls. For example your localhost website url is http://localhost/mywebsite and you want to host your website http://www.testurl.com.then find http://localhost/mywebsite url and replace it with http://www.testurl.com url. Save the .sql file.

Step 5: Import database on server

Go to your cpanel dashboard and click the phpmyadmin in the database section. In the phpmyadmin you can see your newly created database. Click on the import button from top menu. Now you are on import page. In the import page you can click on browse button to choose the database file. Choose the database .sql file and then click on go button.

Step 6: wp-config file changes

Open your wp-config.php file and you see
define('DB_NAME', 'database_name');
define('DB_USER', 'database_user');
define('DB_PASSWORD', 'database_password');
Here write a database name , database user and database password you created in the earlier step. Your website is live now you can login in your wp-admin goto setting and without changing anything, click on save changes button. Go to setting->permalinks choose preferred URL structure and save.

Step 6: Set missing images

When you move your website localhost to live server, you get some missing images.

Comments

  1. Thank you very much for this helpful blog.. keep making more

    ReplyDelete
  2. Thanks for making this very useful blog. It helps me a lot

    ReplyDelete
  3. That was good explanation...it really helped me a lot...thank you...i hope you keep it up...

    ReplyDelete

Post a Comment