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 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
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:
Then let CloudPanel reset the permissions to its defaults. Run this as the site user:
This is CloudPanel's built-in permissions command, with the values from its documentation.
Never use. 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, above "That's all, stop editing!":
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 and 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:.
Update starts, then the site shows "Briefly unavailable for scheduled maintenance". A failed update left a file. Delete it:
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:
Sources: WordPress: file permissions · WordPress: FS_METHOD
More CloudPanel troubleshooting
Applies to CloudPanel v2 on Ubuntu and Debian, October 2026. In the commands, replace with your domain and with your site's user name (shown on the site's Settings page).
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:
unzipStep 1: Check who owns the files
Code:
ls -la /home/siteuser/htdocs/example.com | head
find /home/siteuser/htdocs/example.com ! -user siteuser | headStep 2: Give the files back to the site user
As root:
Code:
chown -R siteuser:siteuser /home/siteuser/htdocs/example.comCode:
su - siteuser
cd ~/htdocs/example.com
clpctl system:permissions:reset --directories=770 --files=660 --path=.Never use
Code:
chmod 777Reload the plugins page; the FTP prompt should be gone.
Step 3: Stop it from coming back
- Upload files as the site user, not root: use the site's SSH/SFTP user from the site's SSH/FTP tab. See CloudPanel SSH, SFTP, FTP and File Manager.
- If you work as root over SSH, switch to the site user first: .Code:
su - siteuser
- Run WP-CLI as the site user too, never as root. See WP-CLI on CloudPanel.
Still asks for FTP after fixing ownership?
Add this line to
Code:
wp-config.phpCode:
define('FS_METHOD', 'direct');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_filesizeCode:
post_max_size"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:
.maintenanceCode:
rm /home/siteuser/htdocs/example.com/.maintenanceUpdates 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 updateSources: WordPress: file permissions · WordPress: FS_METHOD
More CloudPanel troubleshooting
- Installation failed: common install errors
- Can't log in: port 8443, password and 2FA
- Site shows 403 Forbidden or 404
- Too many redirects or mixed content after SSL
- PHP extension missing / enable ionCube
- Varnish showing old pages or breaking logins
- Restore a site from a backup
- SSH or SFTP login fails
- Node.js app shows 502 or keeps restarting
- Site hacked: find malware and clean up
- clpctl errors: not found, wrong user, quoting
Applies to CloudPanel v2 on Ubuntu and Debian, October 2026. In the commands, replace
Code:
example.comCode:
siteuser
