How to completely move for WordPress blog

Moving a blog refers to the work to be done to make the blog run normally after changing the domain name or the host. As a qualified blogger, these must be known. Blog moving is divided into the following situations:

1. Change the domain name, but do not change the host.

2. Don't change the domain name, but change the host.

3. All domain names and hosts have been replaced.

Let's solve the problem of moving according to the situation.

1. Change the domain name, but do not change the host.

Steps to change the domain name: redirect the original domain name 30 1 to the new domain name → change the database content.

(1)30 1 redirect

The purpose of 30 1 redirection is to redirect the content recorded by the original search engine to a new domain name, which can be realized in many ways. ...

If the host is Linux+Apache, it can choose to change. Htaccess file, and insert the following code in the file:

1

2

three

four

five

six

seven

eight

# Go

& ltIfModule mod _ rewrite.c & gt

Options+Follow Symbol Links

Rewrite engine on

rewrite cond % {:% E7 % BC % 96% E8 % BE % 9 1 _ WP-config . PHP

* edit wp-config.php} Codex page. For specific information about MySQL settings, please consult your space provider.

*

* This file is used to automatically generate the wp-config.php configuration file by the installer.

* You can manually copy this file, rename it "wp-config.php", and then enter relevant information.

*

* @ Bao

*/

//* * Information specific to MySQL settings comes from the host you are using * *//

/* * Name of WordPress database */

define('DB_NAME ',' database _ NAME _ here ');

/** MySQL database user name */

define('DB_USER ',' username _ here ');

/** MySQL database password */

define('DB_PASSWORD ',' PASSWORD _ here ');

/** MySQL host */

define('DB_HOST ',' localhost ');

/* * Default text encoding when creating data tables */

define('DB_CHARSET ',' utf8 ');

/* * Database collation type. If you are not sure, please do not change */

define('DB_COLLATE ',' ');

/**#@+

* Authentication key setting.

*

* You can write some characters at will.

* or directly visit {@ link https://api.wordpress.org/secret-key/1.1/salt/WordPress.org private key generation service},

* Any modification will invalidate cookie, and all users must log in again.

*

* @ Starting from 2.6.0

*/

Define('AUTH_KEY',' Put your unique phrase here');

Define('SECURE_AUTH_KEY',' put your unique phrase here');

Definition ('LOGGED_IN_KEY',' put your unique phrase here');

Define('NONCE_KEY',' Put your unique phrase here');

Define('AUTH_SALT',' put your unique phrase here');

Define('SECURE_AUTH_SALT',' put your unique phrase here');

Definition ('LOGGED_IN_SALT',' put your unique phrase here');

Define('NONCE_SALT',' put your unique phrase here');

/**#@-*/

/**

* WordPress data table prefix.

*

* If you need to install multiple WordPress in the same database, please set different data table prefixes for each WordPress.

* Prefix names can only be underlined numbers and letters.

*/

$ table _ prefix = ' wp _

/**

* WordPress language settings, the Chinese version defaults to Chinese.

*

* This setting enables WordPress to display the language you need.

* WP- Content/language should be put together. Mo language file.

* To use WordPress simplified Chinese interface, just fill in zh_CN.

*/

define('WPLANG ',' zh _ CN ');

/**

* Developers only: WordPress debugging mode.

*

* Change this value to "true" and WordPress will display all development tips.

* Plug-in developers are strongly recommended to enable this feature in the development environment.

*/

define('WP_DEBUG ',false);

/* All right! Please do not continue editing. Please save this file. Happy to use! */

/* * Absolute path of WordPress directory. */

If (! Defined ('ABSPATH'))

define('ABSPATH ',dirname(__FILE__)。 '/');

/* * Set WordPress variables and include files. */

require_once(ABSPATH。 WP-settings . PHP’);