Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of migrating the data directory of the system to a directory other than web in dedecms

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you the method of migrating the data directory of the system to a directory outside web in dedecms, I believe most people don't know much about it, so share this article for your reference. I hope you will get a lot after reading this article. Let's learn about it together.

How to migrate the data directory of the system to a directory other than web in dedecms?

Data directory is the directory of system cache and configuration files, which generally has read and write permissions. As long as it is able to write to the directory, there may be security risks, and many webmasters even give this directory executable permissions, which is very dangerous, so we recommend that this data directory be moved out of the Web accessible directory. This article describes how to move the data directory out of the Web access directory.

This operation requires users to have a high understanding of the DedeCMS system. If you feel that you do not have a good grasp of it, you can consider choosing official security-related services.

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

For example, "D:\ dedecms\ v57" is the root directory of our system. We need to migrate the data folder under the directory (figure 1) to a higher-level directory (non-Web directory). Simply cut or copy it directly.

Let's move to the directory one level up and observe the file path.

two。 Modify the configuration constant of the DEDEDATA directory

Find the / include/common.inc.php file in the system directory and change the DEDEDATA constant to your system directory.

3. Configure the tplcache cache file directory

Go to the system background and modify the tplcache directory in the configuration to match the directory you want. (system > system basic parameters > performance options > template cache directory)

All right, so we can migrate the data directory smoothly.

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

If the general permissions of the purchased virtual hosts are set, make sure that the directory where data is located has read and write permissions (the same as the web directory permissions).

The test passed.

The above is all the contents of the method of migrating the data directory of the system to a directory outside web in dedecms. Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report