Zblogphp Website Spatial Database Moving Strategy

21:37:39, August 8, 2017 Yidian Yidi four thousand and forty

If the website takes a long time, or the space server needs to change, it is inevitable that you will encounter the need to move. Today we are going to share the moving process of the website using zblogphp system, hoping to be helpful to those who need it.

First of all, for website relocation, the editor roughly divides it into the following two types:

The first is to move only the space or database, that is, to change only the Web space or the database. It is common to upgrade the space without changing the space provider. In this case, if only the Web space is changed, you can directly download the whole site file via FTP and upload it to the new space without any modification; If you just change the database, such as the MySQL database you are using, and you just need to move to another new MySQL database, you need to first back up the original database, then import the original data into the new database, and then make some necessary modifications to some configuration files on the website as appropriate, For details on how to modify it, please refer to the second move type described in detail later.

The second is that both the space and the database are moved. Since both the space and the database have been changed, some new configurations need to be made for both when moving. The following is the whole process of moving the zblogphp website:

Step 1: Download all the files in the original space, usually through FTP software. Some spaces support package downloading, and then export the data in the original database. The common way is to use phpmyadmin to export the data in the MySQL database.

Step 2: Upload the original space data downloaded in Step 1 to the new space again. At this time, you can try to visit your website, and you will find that there is a database connection error, or other error prompts.

Step 3: This step is very important. Find the c_option.php file in the zb_users directory, and modify some necessary configurations according to the following requirements (parameters that may need to be modified have been annotated in Chinese, and other parameter items are generally ignored):

 <? php return array (   'ZC_CLOSE_WHOLE_SITE' => false, 'ZC_DATABASE_TYPE'=>'mysql',//Database type   'ZC_SQLITE_NAME' => '',   'ZC_SQLITE_PRE' => 'zbp_', 'ZC_MYSQL_SERVER'=>'localhost',//Database address 'ZC_MYSQL_USERNAME'=>'username',//Database user name 'ZC_MYSQL_PASSWORD'=>'*******',//Database password 'ZC_MYSQL_NAME'=>'sqlname',//Database name   'ZC_MYSQL_CHARSET' => 'utf8', 'ZC_MYSQL_PRE'=>'zbp_',//Data table prefix   'ZC_MYSQL_ENGINE' => 'MyISAM',   'ZC_MYSQL_PORT' => '3306',   'ZC_MYSQL_PERSISTENT' => false,   'ZC_PGSQL_SERVER' => 'localhost',   'ZC_PGSQL_USERNAME' => 'postgres',   'ZC_PGSQL_PASSWORD' => '',   'ZC_PGSQL_NAME' => '',   'ZC_PGSQL_CHARSET' => 'utf8',   'ZC_PGSQL_PRE' => 'zbp_',   'ZC_PGSQL_PORT' => '5432',   'ZC_PGSQL_PERSISTENT' => false,   'ZC_YUN_SITE' => '', );

Step 4: After modifying the c_option.php file, import the previously backed up database file into the new database. In fact, your website has successfully moved. There are two places where website relocation is most likely to cause problems. One is that the FTP upload file is incomplete, resulting in abnormal access. In this case, it is recommended to package, upload and decompress the whole site file (space support is required); Second, the import of the database file was aborted when an error occurred. In this case, it is recommended to retain the error information and ask the space provider.

Finally, some people may have thought that after the website moves, it also involves the domain name problem: if you don't need to change the domain name, you just need to change the original domain name resolution to the new space address, and the new space is bound to the original domain name; If the domain name needs to be changed, the resolution and binding are the same as the above. The latest version of zblogphp system can automatically switch and replace the domain name and address involved in the website content. If it is not automatically completed, you need to turn off the fixed domain name function in the website background "Website Settings".

Excellent, really powerful! Well, we must encourage~

Reward zero
account number: mxy310@163.com [Copy]
account number: seventy-seven million nine hundred and forty thousand one hundred and forty [Copy]