HOW TO RESTORE (RESTORE) THE WORDPRESS DATA MANUALLY

Although the restoration of WordPress site data may be less likely to happen, but it is usually done only when the website fails to restore or transfer the domain name. But mastering the basic data recovery techniques will also help you to work out when trouble.

In this article, I will guide you how to recover the WordPress website data manually on the host. Although it is manual, most of the data recovery procedures do this.

See if unknown : How to back up (backup) data manually WordPress .

To recover the data of the most complete WordPress website, you need:

  • A file containing the source code of the website.
  • A .sql file contains the database of the website.

Also, when restoring you should create a completely new database and the folder that needs to restore the file on the host must also be completely empty.

Manually recover WordPress data

Step 1. Restore the source code

To restore the source code is easier, you are to upload the source code compression of the website to the host through the File Manager feature.

cpanel-filemanager.jpg

After uploading, select the file and press Extract.

restore-wp-thucong-01

Unpacked you already have the directory and file source code of the website on the host then.

restore-wp-thucong-02

Ok, now open the wp-config.php file and edit the following into your new database information and save it.

01
02
03
04
05
06
07
08
09
ten
11
/** The name of the database for WordPress */
define('DB_NAME', 'TÊN-DATABASE');
/** MySQL database username */
define('DB_USER', 'USERNAME-DATABASE');
/** MySQL database password */
define('DB_PASSWORD', 'MẬT-KHẨU-DATABASE');
/** MySQL hostname */
define('DB_HOST', 'localhost');

Step 2. Restore the database

To restore the database, please visit phpMyAdmin on the host.

Access the PhpMyAdmin tool

Access the PhpMyAdmin tool

And select the database to restore.

backup-wp-thucong-03

And select Import on the toolbar.

restore-wp-thucong-03

Then upload the .sql file that contains the database of your website and press Go, the other settings remain the same.

restore-wp-thucong-04

If it succeeds then this is okay.

localhost-to-host-10.jpg

Now check that the database prefix matches the setting in the wp-config.php file on the host. The database prefixes are the characters before the “_” sign of the tables.

restore-wp-thucong-05

And here is the setting of the database prefix in the wp-config.php file, which must coincide with the new website running.

01
$table_prefix  = 'wp_';

Step 3. Update permalink

After restoring the data, you will need to flush the permalink in the website by going to Settings -> Permalinks and pressing the Save Changes button.

Finished then, now check that your website is working well offline.

You May Also Like

About the Author: ThangZ

ThangZ is the founder of ThangMedia.com,is a personal webblog that was launched on 2017 and is being operated / developed by ThangZ founder.

Leave a Reply

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

Pin It on Pinterest

Share This