


How to solve the problem that WordPress cannot update automatically in lnmp environment and prompts to fill in FTP information
Alibaba Cloud configures LNMP and installs Nginx. I feel that SFTP is also very convenient, and the speed in China is fast enough, so I am too lazy to install FTP and consume resources.
However, when WordPress prompts to upgrade, it cannot be upgraded normally if you click automatic upgrade. It prompts you to enter FTP account and password information. I think you need to install FTP. SFTP should not work, so I don’t care about this. Every time Each time it was upgraded manually.
My friend’s Alibaba Cloud was messed with, and it can be automatically upgraded. There is no FTP installed. When I asked how to do it, I just messed around for a while, and then it was fine, and it was automatically updated. This is sad. , so I have to think of a way and explore it. It seems that SFTP is still possible.
According to users of the LNMP one-click installation package, when WordPress prompts to upgrade, a page for filling in FTP information appears when clicking "Automatic Upgrade". Many of us who use LNMP do not install an FTP server. In fact, the problem that occurs is that the execution identity of Nginx is not the file owner identity.
Solution:
Suppose your WordPress installation directory is /home/wwwroot/zoneself.org
Use Putty to log in to the Linux VPS, execute: chown -R www /home/wwwroot/zoneself.org
Execute the above command You can change the owner of all files under /home/wwwroot/zoneself.org to www. This will solve the problem that FTP must be filled in for automatic updates.
At this point, mine still doesn’t work. It still can’t automatically upgrade. I also need to modify the WordPress configuration file, wp-config.php, and add this line:
define('FS_METHOD', "direct");
Then enter the backend, click on upgrade, and find that the upgrade is successful!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)
