search
HomeCMS TutorialDEDECMSHow to migrate the data directory in the root directory of DedeCMS to a directory other than the web

How to migrate the data directory in the root directory of DedeCMS to a directory other than the web

How to migrate the data directory in the DedeCMS root directory to a directory other than web?

Move the DedeCMS root directory How to migrate the data directory to a directory outside the web

Recommended learning: 梦Weavercms

The data directory is the directory for the system cache and configuration files, generally both can be read and written As long as the directory can be written to, there may be security risks. Many webmasters even give this directory executable permissions, which is very dangerous. Therefore, we recommend moving this data directory out of the Web-accessible directory. This article will introduce how to move the data directory out of the web access directory.

Note:

This operation requires the user to have a high understanding of the DedeCMS system. If you feel that you are not very familiar with it, you can consider choosing the related services of the Dreamweaver Administrator's Home. Click to view

1. Transfer the data directory to a non-Web directory

Our example here is "D:dedecmsv57" as the root directory of our system. We need to transfer the data folder under the directory (such as Figure 1) Migration requires the upper-level directory (non-Web directory). Simply cut or copy it.

How to migrate the data directory in the root directory of DedeCMS to a directory other than the web

We move to the upper level directory and pay attention to the file path.

How to migrate the data directory in the root directory of DedeCMS to a directory other than the web

2. Modify the configuration constants of the DEDEDATA directory

Find the /include/common.inc.php file in the system directory and modify the DEDEDATA constants to your system Table of contents.

How to migrate the data directory in the root directory of DedeCMS to a directory other than the web

3. Configure the tplcache cache file directory

Enter the system background and modify the tplcache directory in the configuration to the directory you want.

How to migrate the data directory in the root directory of DedeCMS to a directory other than the web

4. Modify the index.php file in the root directory

How to migrate the data directory in the root directory of DedeCMS to a directory other than the web

Line 9, change /data/ For: /../data/

Okay, so we have successfully migrated the data directory.

Note:

This operation is currently only valid for testing in the V57 system. Other versions of the system may need to be adjusted.

The above is the detailed content of How to migrate the data directory in the root directory of DedeCMS to a directory other than the web. For more information, please follow other related articles on the PHP Chinese website!

Statement
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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use