Home > CMS Tutorial > PHPCMS > How to change domain name when moving phpcms v9 website

How to change domain name when moving phpcms v9 website

hzc
Release: 2020-06-05 17:18:01
Original
4371 people have browsed it

How to change domain name when moving phpcms v9 website

PHPCMS is the leading domestic website management system and an open source PHP development framework.

This article introduces how to change the domain name when moving the phpcms v9 website.

1. Install phpcms in the new host space. The newly installed version must be the same as the version to be moved, otherwise problems may occur. During the new installation, all settings except the database configuration should be the same as the original ones. If they are different, there is no problem. Then make a copy of the config.inc.php file of the original host and modify it and it will be OK. Also, the prefix of the newly installed data table must be the same as the old one, otherwise the old settings will be retained. Because the prefix is ​​different, the table with the old prefix will not be overwritten but added.

2. Use the database backup tool that comes with phpcms to back up the database, and then upload it to the same location in the new space!

3. You copy the original include/config.inc.php, change the database configuration to the new space, and do not change other things. There is also a data/config.js thing. Its setting requirements are consistent with those in config.inc.php! So you can also replace the original one with the newly installed one, and replace both. This will reduce a lot of inexplicable problems. If you don’t know how to configure the database, compare the new config.inc.php file with the old one, and replace the three items below the old file with the new ones. Then the modified old file is uploaded to the space to overwrite the new one. define('DB_HOST', 'localhost'); //Database server host address define('DB_USER', 'root'); //Database account define('DB_PW', '111111'); //Database password

4. Upload the uploadfile (attachments such as pictures) from your original site to the new space. ​

5. Upload the skin file to the new space, including the material folder (this is not necessary if the skin has not been modified)

6. Upload your modified files to the new space to overwrite the unmodified ones. ​

7. Log in to the backend of the new space and use database tools to restore the database.

8. Update the cache, update the skin, and generate the corresponding page! There are not many articles about phpcms website transfer space and backup database transfer space.

So I will publish the operation method:

1. Back up the current mysql database The space basically has phpmyadmin. First enter phpmyadmin and select the language: Chinese. Enter the database. Find the database table of PHPCMS in the "Database" on the left. Click on the export above to select all tables of PHPCMS. Generally, select all tables starting with PHPCMS. For the database table of PHPCMS, select "Save as file" below. If your database is relatively large, you can export it one table at a time, which is convenient for later import and export and save it as a phpcms.sql file

2. After moving the file, connect it to FTP. Use leapFTP to DOWN all the files to the new space and upload them

3. Import the data to the new space. Enter phpmyadmin in the new space. If there is data in the database that overlaps with PHPCMS, delete it first. If there is no such step, this step will be omitted. Then use SQL to import and select the import file. Note: SQL import will not overwrite, so you must first delete the heavy data and then wait. The waiting time may be very long or very short, depending on the speed of the space. In this way, the database will be imported.

4. Follow-up work. If your system is UNIX/LINUX, please set the folder attributes. If not, you can skip this step. The files and folders that need to be set to 777 have the directory attributes set to 777.

./ads/uploadfile/ The directory is writable ./article/ The directory is writable ./article/special/ The directory is writable

./article/thumb/ The directory is writable ./article/ uploadfile/ The directory is writable ./data/ The directory is writable

./data/getdata/ The directory is writable ./data/getdata/dedecms21article.txt The file is writable

./data/getdata /dedecms21member.txt File is writable ./data/getdata/discuz41member.txt File is writable

./data/getdata/discuz41post.txt File is writable ./data/getdata/nc.txt File is writable

./data/getdata/pa201article.txt The file is writable ./data/getdata/pa201member.txt The file is writable

./data/getdata/phpwindmember.txt The file is writable ./data /getdata/phpwindpost.txt The file is writable

./down/ The directory is writable ./down/special/ The directory is writable ./down/thumb/ The directory is writable ./down/uploadfile/ The directory is writable

./page/ Directory is writable ./page/aboutus.html File is writable ./page/ads.html File is writable

./page/announce.html File is writable ./ page/contactus.html File is writable ./page/joinus.html File is writable

./picture/ Directory is writable ./picture/special/ Directory is writable ./picture/thumb/ Directory is writable

./picture/uploadfile/ The directory is writable ./templates/ The directory is writable ./templates/templateprojectnames.php The file is writable

./uploadfile/ The directory is writable ./vote/data/ The directory is writable ./config.php The file is writable

./index.html The file is writable ./install.php The file is writable . /sitemap.xml file can be written

The last modified database information of config.php,

is the new space

$dbhost = 'localhost';

$dbuser = 'root';

$dbpw = 'root';

$dbname = 'phpcms';

$tablepre = 'phpcms_';

$database = 'mysql';

$pconnect = 1;

Complete

Recommended tutorial "phpcms tutorial"

The above is the detailed content of How to change domain name when moving phpcms v9 website. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template