If WordPress asks you "To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed," it means WordPress cannot write to its own files directly. This happens when file ownership does not match the PHP process, and there is a simple fix.
Add FS_METHOD to wp-config.php
Add this line to your wp-config.php file (before the "That's all, stop editing" comment):
define('FS_METHOD', 'direct');
This tells WordPress to write files directly instead of using FTP. On Ultra Web Hosting, this is safe because PHP runs as your cPanel user, so it already has the correct permissions.
01. Why This Happens
WordPress checks whether it can create a temporary file in the wp-content directory. If the ownership of the WordPress files does not match the user running PHP, WordPress assumes it does not have write access and falls back to asking for FTP credentials.
On Ultra Web Hosting servers, PHP runs via LSAPI as your cPanel user, so direct file writing works correctly. WordPress's ownership check is sometimes too cautious, triggering the FTP prompt even when direct writing would work fine.
02. How to Fix It
Method 1: Edit wp-config.php (Recommended)
- Open wp-config.php in cPanel File Manager or via FTP
- Find the line that says
/* That's all, stop editing! */ - Add this line above it:
define('FS_METHOD', 'direct');
- Save the file
WordPress will now write files directly without asking for FTP credentials. Plugin installs, updates, and theme changes should all work immediately.
Method 2: Fix File Ownership
If you have SSH access, you can fix the file ownership so WordPress's check passes naturally:
chown -R $USER:$USER ~/public_html
This sets all files in your website directory to be owned by your cPanel user. After this, WordPress should detect that it has direct write access without needing the FS_METHOD constant.
03. Check Directory Permissions
If FS_METHOD is set to direct and updates still fail, the directory permissions may be too restrictive. WordPress needs these permissions:
- Directories: 755
- Files: 644
- wp-content: 755
- wp-content/uploads: 755
- wp-content/plugins: 755
- wp-content/themes: 755
Via SSH:
find ~/public_html -type d -exec chmod 755 {} \;
find ~/public_html -type f -exec chmod 644 {} \;
Do not set files or directories to 777. This is a security risk on shared hosting and is not necessary on Ultra Web Hosting since PHP runs as your user. If a plugin or theme asks you to set 777 permissions, FS_METHOD direct plus 755/644 permissions is the correct solution.
Still Being Asked for FTP Credentials?
If the FTP prompt persists after adding FS_METHOD, open a ticket and we will check file ownership on your account.
Open a Support TicketQuick Recap
- Add
define('FS_METHOD', 'direct');to wp-config.php - The quickest fix - This is safe on Ultra Web Hosting - PHP runs as your cPanel user
- Fix ownership if needed -
chown -R $USER:$USER ~/public_htmlvia SSH - Correct permissions are 755/644 - Never use 777
- Changes take effect immediately - No restart needed
WordPress configuration on shared hosting · Last updated March 2026 · Browse all WordPress articles
