Home Backend Development PHP Tutorial Phpcms V9网站从当地上传到服务器需要修改的地方小结

Phpcms V9网站从当地上传到服务器需要修改的地方小结

Jun 13, 2016 pm 12:03 PM
localhost phpcms

Phpcms V9网站从本地上传到服务器需要修改的地方小结

网站在本地做好后要迁移到服务器上;网站在发展的过程中,很可能多次的修改域名。那么在Phpcms V9中我们要怎么进行设置呢

请进行以下步骤的修改:

1.修改/caches/configs/system.php里面所有和域名有关的,把以前的老域名修改为新域名就可以了。
2.进行后台设置-》站点管理 对相应的站点的域名进行修改。
3.更新系统缓存。点击后台右上角的“更新缓存”按钮。
4.进入内容-》附件管理-》附件地址替换。把附件地址批量的替换为新的地址。
5.内容-》批量更新URL 。把所有的文章的地址都更新一下。

6.下面就是把全站都生成一次了。

再进一步,怎么转移空间,并且更换域名呢?

这种情况比更换域名更加复杂一点,涉及到数据库的迁移。

而这种情况比更换域名还要靠谱,往往我们在本地做好了网站,再上传到空间,这就涉及到更换域名和数据库的迁移。


Phpcms V9网站迁移具体方法如下:

1.上传所有的程序文件(如果主机支持压缩包在线解压,比如华夏名网的空间就支持。,那么就打成zip的包,ftp上传到对应目录,在线解压)。
2.在本地采用myphpadmin等数据库管理软件导出本地数据库sql文件,然后用editplus等软件批量更换域名地址,比如本来是本地的http://localhost/phpcms,现在的域名是www.jb51.net,那么就需要批量将http://localhost/phpcms批量替换为http://www.jb51.net,替换后保存。
3.在服务器的数据库管理里边,通过myphpadmin等导入修改后的sql文件。
4.修改第一步解压好的/caches/configs/database.php中的数据库名称密码,以及修改/caches/configs/system.php里面所有和域名有关的,把以前的老地址修改为新地址。
5.登录后台,更新缓存,批量更新生成html,这样就转移成功。 

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Why can't mysql connect to localhost? Why can't mysql connect to localhost? Aug 10, 2023 pm 02:55 PM

The reasons why mysql cannot connect to localhost are that the mysql service is not started, the mysql port is occupied, and there is a problem with the MySQL configuration file. Detailed introduction: 1. In Windows systems, you can open the service manager by entering "services.msc" at the command prompt, then find the mysql service and ensure that its status is "Running". In Linux systems, you can use the "services.msc" command to check and control the service status; 2. You can use the open command and so on.

What should I do if localhost cannot be opened? What should I do if localhost cannot be opened? Nov 07, 2023 pm 02:47 PM

Solution: 1. Check the running status of the server and make sure it is listening on the correct port; 2. Try to temporarily disable the firewall or security software, and then try to access localhost again; 3. Check the hosts file of the operating system to ensure that localhost is resolved correctly ; 4. Try to restart the network adapter or reconfigure the network connection; 5. Try to change the port used by the local server, or close other programs that occupy the same port; 6. Try to manually add the corresponding IP address and domain name in the hosts file, etc.

What does linux localhost mean? What does linux localhost mean? Mar 14, 2023 am 09:53 AM

linux localhost means "computer host name". The host name is used to identify an independent computer on the network; the root in "root@localhost" represents the currently logged-in user. In Linux, the administrator account is root, and the user is root. Log in to the Linux machine as a user.

How to jump to the details page in phpcms How to jump to the details page in phpcms Jul 27, 2023 pm 05:23 PM

How to jump to the details page in phpcms: 1. Use the header function to generate a jump link; 2. Loop through the content list; 3. Get the title and details page link of the content; 4. Generate a jump link.

What framework is phpcms? What framework is phpcms? Apr 20, 2024 pm 10:51 PM

PHP CMS is a PHP-based open source content management system for managing website content. Its features include ease of use, powerful functionality, scalability, high security, and free open source. It can save time, improve website quality, enhance collaboration and reduce development costs, and is widely used in various websites such as news websites, blogs, corporate websites, e-commerce websites and community forums.

WeChat Login Integration Guide: PHPCMS Practical Combat WeChat Login Integration Guide: PHPCMS Practical Combat Mar 29, 2024 am 09:18 AM

Title: WeChat Login Integration Guide: PHPCMS in Action In today’s Internet era, social login has become one of the essential functions of a website. As one of the most popular social platforms in China, WeChat’s login function is also used by more and more websites. This article will introduce how to integrate the WeChat login function in the PHPCMS website and provide specific code examples. Step 1: Register a WeChat Open Platform Account First, we need to register a developer account on the WeChat Open Platform and apply for the corresponding development permissions. Log in [WeChat open platform]

Isn't phpcms free? Isn't phpcms free? Mar 01, 2023 am 10:24 AM

phpcms is not completely free. phpcms is an open source cms system, but open source does not mean free. It has two versions: free version and commercial version. The free version is limited to personal non-commercial use, while the commercial version requires purchasing a license; individuals can use it for research, and if it is commercial application , you need to pay a certain fee.

What does phpcms mean? What does phpcms mean? Apr 20, 2024 pm 10:39 PM

PHPCMS is a free and open source content management system (CMS) that features: open source, modularity, flexibility, user-friendliness and community support. It can be used to create various types of websites, including corporate websites, e-commerce websites, blogs, and community forums. Technical requirements include: PHP 5.6 or higher, MySQL, MariaDB or PostgreSQL database, and Apache or Nginx web server.

See all articles