Last update at :2024-07-07,Edit by888u
When most users use VPS to set up a website environment, they will either use a WEB panel or a one-click package. Those who pursue technology or demonstrate their own abilities will install their own assembled environment. Among the many one-click package environments, Junge's LNMP environment is still used more often. Version 1.2 was released in June. Although there were many problems reported by users when the new version was released, after a few months, it should be Currently relatively stable.
Snail discovered that this one-click package has too strict permission settings when using the WordPress program. For example, when we start a theme online in the background, we cannot see other theme packages in our theme directory.
First, display of problems
After clicking on our WordPress backend appearance-theme, we will see an interface like this.
We can only see the current theme and cannot see other themes in the theme directory, let alone switch and start other themes. Moreover, the current theme does not have permission to edit. It should be caused by a certain component restricting permissions.
Second, solution
To solve this problem, Snail has also shared the restrictions on the scandir function before. We can just cancel this restriction.
1. vi /usr/local/php/etc/php.ini
2. Find the disable_functions line
3. Delete the scandir function position, see the picture above. Because the LNMP default package is directly restricted when installed, it is not started. This should be due to security issues. If we are necessary or do not understand its purpose well, we can add this function after we start the current theme. However, when editing the theme in the future, you need to FTP to the local computer.
4. Restart PHP to take effect
/etc/init.d/php-fpm restart
Finally, we check the effect and return to the theme menu.
In this way, our problem has been solved so far.
Recommended site search: free virtual host application, vps server rental, overseas server, Singapore server permanent free cloud server address, Hong Kong vps, American virtual space, Korean proxy IP, independent IP, rent a server,
发表评论