If you’re a WordPress user, chances are high that at some point, you’ve come across the frustrating and confusing “Connection Information” screen. This prompt typically appears when you try to install or update a plugin, theme, or the WordPress core itself. It asks you for FTP credentials such as the hostname, username, and password to proceed. While this is intended to be a security measure, for most users—especially those on shared hosting environments—it becomes a major inconvenience.
The root cause of this issue lies in how WordPress interacts with your server’s file system. When it doesn’t have the necessary permissions or when the server configuration doesn’t allow direct file access, WordPress falls back to asking for FTP credentials. This guide is meant to be your ultimate resource for understanding this problem in detail and resolving it effectively.
Whether you’re a blogger, developer, freelancer, or a digital marketer managing multiple websites, fixing this issue the right way will save you time, headaches, and potential security vulnerabilities in the long run.
Fix WordPress asking for FTP Credentials
1. What Is the WordPress FTP Credentials Prompt?
When WordPress needs to modify its files—whether by adding a plugin, updating themes, or applying security patches to the core—it prefers direct access to the file system. When that access isn’t available, it resorts to alternative file transport methods like ftpext, which requires authentication via FTP or FTPS.
The message typically reads:
Connection Information To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed.
Requested fields include:
- Hostname (e.g., ftp.yoursite.com or localhost)
- FTP Username
- FTP Password
- Connection Type (FTP or FTPS)
2. Why This Prompt Appears: Deep Dive Into Root Causes
There are multiple scenarios that can trigger this prompt. Let’s look into them:
- File Permissions and Ownership: When WordPress files and folders aren’t owned by the same user that runs the web server (often
www-datafor Apache/Nginx), it lacks write access. - PHP Handler Configurations: Using PHP as an Apache module versus PHP-FPM can affect file permission handling.
- Security Restrictions on the Server: Some managed hosts or shared environments limit file operations for security.
- Corrupt or Compromised Files: Infections, backdoors, or unauthorized edits can interfere with expected file behavior.
- Missing Constants in wp-config.php: WordPress needs configuration cues to determine how to access the file system.
3. Risks of Misguided or Incomplete Fixes
A common but risky fix is to simply force WordPress to use the direct method by adding this to your wp-config.php file:
define('FS_METHOD', 'direct');
While this line works on most VPS or well-configured shared hosts, using it alone—without correcting file permissions or cleaning up infections—can lead to deeper issues like:
- Broken update processes
- Plugin installations failing midway
- Permission escalation vulnerabilities
- Site slowdown due to improper caching or corrupted plugin data
In short: the quick fix is only part of a larger puzzle.
4. Important Pre-Fix Steps: Backup and Version Check
Before you proceed with any changes, make sure to:
- Backup Everything: Use tools like UpdraftPlus or manually copy your
wp-contentfolder and database. - Check WordPress Version: Ensure you’re using a supported version. Outdated versions might have bugs unrelated to permissions.
- Verify PHP Compatibility: WordPress recommends PHP 7.4 or above. Check with
phpinfo()or contact your host. - Confirm Access Type: Whether FTP, SFTP, SSH, or direct web access—know your hosting environment.
5. Quick Permanent Fix Using wp-config.php and Permissions
For many users, resolving the FTP credential issue boils down to setting the correct permissions and modifying configuration files.
A. Modify wp-config.php
Edit the configuration file by inserting this just before the line: /* That's all, stop editing! Happy publishing. */
define('FS_METHOD', 'direct');
This forces WordPress to attempt direct file access instead of FTP.
B. Correct Ownership Settings
Login to your server via SSH and execute:
sudo chown -R www-data:www-data /var/www/html/yourwebsite.com/
Change the path as per your actual directory.
C. Apply Safe Permissions
find /var/www/html/yourwebsite.com/ -type d -exec chmod 755 {} \;
find /var/www/html/yourwebsite.com/ -type f -exec chmod 644 {} \;
D. Restart Your Web Server
sudo systemctl restart apache2 # or for NGINX sudo systemctl restart nginx
Your FTP prompts should now disappear.
6. Full Manual Fix with Clean Reinstallation
If you suspect malware or file corruption—or just want a clean slate—perform a manual cleanup and reinstall.
Step-by-Step Instructions:
- Delete All Files in public_html Except
wp-contentNavigate topublic_htmland carefully delete everything except thewp-contentfolder. This preserves your media uploads, themes, and plugins. - Manually Inspect
wp-contentfor Malware Look for unusual filenames, hidden PHP files inuploads/, or unknown themes/plugins. Remove them. - Download Latest WordPress CMS Visit the official site: https://wordpress.org/download
- Unzip WordPress Locally or on Server Extract the ZIP file into a temporary directory.
- Remove Fresh
wp-contentFolder You already have your original one—so delete the new one from the fresh WordPress files. - Upload Remaining Files to
public_htmlCopy the unzipped files (excludingwp-content) into your website’s root. - Update
wp-config.phpEnsure it has the correct database credentials:
define('DB_NAME', 'your_db_name');
define('DB_USER', 'your_db_user');
define('DB_PASSWORD', 'your_db_password');
define('DB_HOST', 'localhost');
And re-add the line:
define('FS_METHOD', 'direct');
- Set File Ownership Again
sudo chown -R www-data:www-data /var/www/html/example.com/
7. Proper File and Folder Permission Settings
Correct permissions ensure security and stability.
| Item | Recommended Permission |
|---|---|
| Folders | 755 |
| Files | 644 |
| wp-config.php | 600 (optional secure) |
| .htaccess | 644 |
Run:
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
If you face permission-denied errors, recheck ownership (www-data or your specific web user).
8. Post-Fix Maintenance and Hardening Tips
Once the issue is fixed, keep it that way:
- Install Security Plugins: Wordfence, Sucuri, or iThemes Security
- Automate Backups: Use UpdraftPlus, Jetpack, or BlogVault
- Disable File Editing in Dashboard:
define('DISALLOW_FILE_EDIT', true);
- Scan wp-content Weekly: For backdoors or suspicious files
- Keep Themes/Plugins Updated: Use auto-update if possible
- Use a Web Application Firewall (WAF)
9. Conclusion and Community Support
Congratulations! You’ve taken a significant step in securing and stabilizing your WordPress website. The FTP credential prompt issue is often an indication of deeper configuration or security concerns. By following the steps outlined in this guide, you’ve not only resolved a technical glitch but also enhanced your site’s robustness.
Let’s recap what you’ve achieved:
- Identified and understood the root cause of the FTP prompt
- Executed a permanent fix through permissions and configuration
- Cleaned your site manually (if needed)
- Reinstalled core WordPress files safely
- Set the correct ownership and file permissions
- Implemented ongoing best practices
10. Appendix: Recommended Tools & Plugins
| Purpose | Tool/Plugin Suggestions |
| Security | Wordfence, Sucuri, iThemes |
| Permissions Fix | All In One WP Security |
| Backups | UpdraftPlus, BlogVault, Jetpack |
| FTP Access | FileZilla, Cyberduck |
| Malware Scanning | MalCare, Wordfence Scanner |
Best Practices to Avoid WordPress Asking for FTP Credentials in the Future
Preventing WordPress from asking for FTP credentials is mostly about maintaining a clean, secure, and well-configured hosting environment. Following these best practices will help you avoid this issue permanently while also improving your website’s security and performance.
1. Avoid Using FTP to Upload Plugins and Themes Manually
Manually uploading plugins or themes via FTP can sometimes cause ownership mismatches, where files are owned by a different system user than the web server. When this happens, WordPress loses the ability to modify those files, which triggers the FTP credentials prompt.
Whenever possible, install plugins and themes directly from the WordPress dashboard. This ensures that files are created and owned by the correct user, allowing WordPress to update and manage them without permission conflicts.
2. Choose Hosting With Proper WordPress Optimization
Not all hosting providers are optimized for WordPress. Low-quality or poorly configured hosting often restricts PHP’s ability to write files, forcing WordPress to fall back to FTP mode.
Choose a hosting provider that:
- Supports direct filesystem access
- Runs PHP as the same user as your WordPress files
- Offers managed WordPress environments
- Provides correct default permissions automatically
WordPress-optimized hosting minimizes permission issues and significantly reduces the chances of seeing FTP credential requests.
3. Maintain Standard File and Folder Permissions (755/644)
Correct permissions allow WordPress to write files while keeping your site secure.
- Folders: 755
- Files: 644
- wp-config.php: 600 or 640
Avoid changing permissions randomly while troubleshooting. Incorrect or inconsistent permissions often lead to WordPress losing write access, which results in FTP prompts during updates or installations.
4. Never Use 777 Permissions (Major Security Risk)
Setting permissions to 777 gives read, write, and execute access to everyone, including malicious users and scripts. While it may temporarily stop WordPress from asking for FTP credentials, it exposes your site to:
- Malware injections
- Unauthorized file modifications
- Complete site compromise
Using 777 is a dangerous shortcut and should never be used on a live website. Proper ownership and standard permissions are always the correct solution.
5. Always Update WordPress Through the Dashboard
Updating WordPress core, themes, and plugins via the dashboard ensures that WordPress handles file operations using the correct permissions and ownership.
Avoid:
- Uploading update files manually
- Overwriting core files via FTP
- Using unofficial update methods
Dashboard updates reduce permission conflicts and help WordPress maintain consistency across your file system.
6. Avoid Mixing Multiple Deployment Methods
Using a mix of FTP uploads, file manager edits, Git deployments, and migration tools can cause inconsistent file ownership. Stick to one deployment method whenever possible.
If you use Git or staging environments, make sure deployments preserve correct file ownership and permissions.
7. Regularly Audit File Ownership and Permissions
Occasionally check your WordPress directory to ensure:
- Files are owned by the correct user
- No folders have unsafe permissions
- Core files haven’t been modified unintentionally
This proactive approach helps detect problems before WordPress starts asking for FTP credentials again.
Conclusion
When WordPress asks for FTP credentials, it’s not a random error—it’s a clear signal that your website is facing file permission or server configuration issues. While the prompt may seem harmless, ignoring it or using quick fixes like unsafe permissions can lead to bigger security and stability problems.
In most cases, the issue can be permanently resolved by ensuring proper file ownership, maintaining standard permissions (755 for folders and 644 for files), and allowing WordPress to write files directly using the correct filesystem method. Simple steps like updating plugins through the dashboard, avoiding manual FTP uploads, and choosing a WordPress-optimized hosting provider go a long way in preventing this problem from recurring.
Rather than treating FTP prompts as an inconvenience, consider them a reminder to keep your WordPress environment clean, secure, and well-managed. Fixing the root cause not only eliminates the FTP credential request but also improves your site’s security, performance, and long-term reliability.
By following the solutions and best practices outlined in this guide, you can ensure smooth updates, hassle-free plugin installations, and a more stable WordPress website overall.
Bookmark this guide for future use and share it with fellow developers or WordPress users. Your support helps others fix their sites with confidence!
FAQs: Fix WordPress asking for FTP Credentials
Why does WordPress keep asking for FTP credentials?
WordPress asks for FTP credentials when it cannot write files directly to your server. This usually happens due to incorrect file permissions, ownership mismatches, or hosting server restrictions that prevent PHP from modifying files during plugin, theme, or core updates.
Is it safe to enter FTP credentials in WordPress?
Entering FTP credentials is generally safe but not recommended as a permanent solution. Storing FTP credentials can increase security risks and does not fix the root cause. It’s better to resolve the underlying permissions or ownership issue so WordPress can update files directly.
What is the best permanent fix for the FTP credentials issue?
The most reliable fix is:
- Ensuring correct file ownership
- Setting proper permissions (755 for folders, 644 for files)
- Adding the following line to
wp-config.php:
define('FS_METHOD', 'direct');
This allows WordPress to write files directly without using FTP.
Can I fix this issue without FTP or cPanel access?
In most cases, no. Fixing this issue typically requires server-level access through cPanel, File Manager, FTP, or SSH. If you don’t have access, contact your hosting provider and ask them to fix file ownership and permissions.
Does this issue affect website security?
Yes. Incorrect permissions or insecure fixes like using 777 permissions can expose your site to hacking, malware, and unauthorized file changes. Proper permissions and ownership are essential for maintaining WordPress security.
Why does this happen even on managed WordPress hosting?
Although rare, it can happen due to:
- Migration errors
- Manual file uploads
- Restored backups with wrong ownership
- Server misconfigurations
Managed hosting support can usually fix this quickly.
Should I use 777 permissions to stop the FTP prompt?
No. Setting permissions to 777 is a major security risk. While it may temporarily stop the FTP prompt, it leaves your site vulnerable to attacks. Always use 755 for folders and 644 for files instead.
Does adding FS_METHOD = direct break WordPress?
No, as long as your server permissions and ownership are correct. In fact, most WordPress-optimized servers support this method. Problems only occur when permissions are misconfigured.
Why does WordPress ask for FTP credentials on localhost?
On localhost environments like XAMPP, WAMP, or MAMP, WordPress may lack permission to write files. Running the server as administrator or adjusting OS-level permissions usually resolves the issue.
Will reinstalling WordPress fix the FTP credentials problem?
A clean reinstallation can fix the issue only if file ownership and permissions are corrected afterward. Reinstalling alone without fixing permissions may not solve the problem.
Should I contact my hosting provider?
Yes. If none of the fixes work, your hosting provider can:
- Correct file ownership
- Enable direct filesystem access
- Fix server-level permission issues
This is often the fastest and safest solution.
Does this issue affect automatic updates?
Yes. When WordPress cannot write files directly, automatic updates may fail or be disabled, which can leave your site outdated and insecure.
Can plugins cause this issue?
Yes. Migration, backup, or security plugins can sometimes change file permissions or ownership. Always verify permissions after using such plugins.
Does changing themes trigger the FTP credentials prompt?
Yes. Installing or updating a theme can trigger the FTP credentials prompt if WordPress lacks write access to the wp-content/themes directory. This usually happens due to incorrect permissions or file ownership, especially after manual uploads or migrations.
Can a website migration cause WordPress to ask for FTP credentials?
Absolutely. During migrations, file ownership and permissions often change, especially when moving between hosting providers. If files are owned by a different system user after migration, WordPress will ask for FTP credentials until ownership and permissions are corrected.
Why does WordPress ask for FTP credentials after restoring a backup?
Backup restorations can overwrite existing permissions and ownership settings. If the restored files don’t match the web server user, WordPress won’t be able to modify files, which results in the FTP credentials prompt.
Is this issue related to PHP version or server updates?
Indirectly, yes. Upgrading PHP or applying server updates can change how files are executed or owned. In some cases, this can disrupt WordPress’s ability to write files, causing the FTP credentials issue to appear unexpectedly.

How to Fix 413 Request Entity Too Large NGINX & Kubernetes