Two methods of WordPress website transfer server operation

Time:2020-1-21

The first method:
My blog has been running on the Internet. Today, I want to set up a local database, including databases that are exactly the same as those on the Internet. The specific operation steps are as follows:
1. First, back up and download the latest. SQL database file in WP background tools = backup
2. Package and download the program locally and extract it to the corresponding PHP running folder, and modify the configuration file wp-config.php to be consistent with the configuration of your own computer.
3. Use source: D: / wp.sql to import the database file. The specific path is the same as the. SQL file you downloaded.
4. Modify the record siteurl in the database table WP options and the option “value” in home to the local corresponding value. My modification is http: / / localhost / WordPress CN
In this way, you can normally access debugging and WordPress locally. This is done without having to install WP from scratch.

The second method:
WordPress uses MySQL database. When changing servers, you need to successfully transfer the data from the original server to the new server. If the database transfer is not successful, it will lead to website exceptions. Here is a method to transfer the database by using the combination of plug-in and phpMyAdmin.
The plug-ins needed areWordPress Database Backup, the download address of the plug-in is:http://wordpress.org/extend/plugins/wp-db-backup。 After downloading, upload it to WP content \ plugins and enable it in the background plug-in. After enabling the plug-in, there will be an additional “backup” item in the “tools” of the background control panel. Click it, as shown in the figure, and you can choose to back up the database records in some plug-ins (as shown in the figure below).

WordPress Database Backup备份数据库
WordPress database backup

Then in the backup options, you can select the location to save the backup file (save to the server, local computer and send to the administrator’s mail), and select according to your own requirements. Finally, click “back up now” to start backing up the files. After the database backup, download the “WP content” folder on the backup server (your WordPress theme files, plug-in files, upload files, etc. are all in this folder).
Here’s how to install WordPress and import the files you just backed up into the new MySQL database with phpMyAdmin.
First, install WordPress completely on your new server (this is very simple, there are online tutorials), and upload the “WP content” folder just backed up to overwrite the “WP content” folder. After installation, log in MySQL database through phpMyAdmin. Click the database name on the left, change “collation” to Latin1 “general” Ci in “operation”, and then click “execute”. Finally, click Import. In import,

Wordpress数据库的导入
Import of WordPress database

If you have any other questions about the database transfer of WordPress server relocation, please leave a message in the comments below for us to discuss. Thank you.

Recommended Today

PHP realizes UnionPay business H5 payment

UnionPay business H5 payment interface document: document address 1: H5 payment interface address: 1: Alipay payment Test address: http://58.247.0.18:29015/v1/netpay/trade/h5-pay Official address: https://api-mop.chinaums.com/ 2: UnionPay payment Test address: http://58.247.0.18:29015/v1/netpay/uac/order Official address: https://api-mop.chinaums.com/ 2: Basic parameters required by the interface The interface uses get parameters. After the interface parameters are directly put into the interface address, the […]