AdminsForum

CloudPanel WordPress Guides

Guide WordPress on CloudPanel Asks for FTP Details or Can't Update Plugins: Fix

Started by JAY 0 replies 100 views
1JAY
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
#1
WordPress on CloudPanel asks for FTP details or can't update plugins: fix

You click "Update" or "Install plugin" and WordPress asks for an FTP hostname, username and password. Or updates fail with "Could not create directory" or "Installation failed". On CloudPanel, this almost always means WordPress can't write to its own files because they belong to the wrong user.

Why it happens
CloudPanel runs each site's PHP as that site's own user (the site user you chose when creating the site). WordPress can only update itself if its files belong to that user. Files you uploaded or extracted as root (over SSH, SFTP as root, or with
Code:
unzip
as root) belong to root, so WordPress can't touch them and falls back to asking for FTP.

Step 1: Check who owns the files
Code:
ls -la /home/siteuser/htdocs/example.com | head find /home/siteuser/htdocs/example.com ! -user siteuser | head
The second command lists files that do not belong to the site user. If it prints anything, that's your problem.

Step 2: Give the files back to the site user
As root:
Code:
chown -R siteuser:siteuser /home/siteuser/htdocs/example.com
Then let CloudPanel reset the permissions to its defaults. Run this as the site user:
Code:
su - siteuser cd ~/htdocs/example.com clpctl system:permissions:reset --directories=770 --files=660 --path=.
This is CloudPanel's built-in permissions command, with the values from its documentation.
Never use
Code:
chmod 777
. It makes the site easy to hack and doesn't fix ownership anyway.

Reload the plugins page; the FTP prompt should be gone.

Step 3: Stop it from coming back
Still asks for FTP after fixing ownership?
Add this line to
Code:
wp-config.php
, above "That's all, stop editing!":
Code:
define('FS_METHOD', 'direct');
This tells WordPress to write files directly. Only use it after fixing ownership; it doesn't fix permissions on its own.

Other reasons plugin installs fail
"The uploaded file exceeds the upload_max_filesize directive." Big plugin or theme zips need a higher PHP upload limit. Raise
Code:
upload_max_filesize
and
Code:
post_max_size
in the site's PHP settings. See How to change PHP version and PHP settings in CloudPanel.

"Could not create directory" with correct ownership. The disk may be full:
Code:
df -h /
.

Update starts, then the site shows "Briefly unavailable for scheduled maintenance". A failed update left a
Code:
.maintenance
file. Delete it:
Code:
rm /home/siteuser/htdocs/example.com/.maintenance
Then run the update again.

Updates time out. Large updates on a slow server can hit PHP time limits. Run them with WP-CLI instead, which has no web timeout:
Code:
wp plugin update --all wp core update

Sources: WordPress: file permissions · WordPress: FS_METHOD


More CloudPanel troubleshooting
Applies to CloudPanel v2 on Ubuntu and Debian, October 2026. In the commands, replace
Code:
example.com
with your domain and
Code:
siteuser
with your site's user name (shown on the site's Settings page).
Reply

Messages In This Thread
WordPress on CloudPanel Asks for FTP Details or Can't Update Plugins: Fix - by JAY - 10-23-2026, 08:01 AM
Possibly Related Threads…matched by title
Replies:0Views:112
Replies:0Views:160

Users browsing this thread: 1 Guest(s)
Forum Jump: