WordPress asking for FTP credentials

Fix WordPress Asking for FTP Credentials in 4 Easy Methods

Currently, WordPress is one of the most popular CMS platforms in the web arena because of bringing lots of customization opportunities and flexibility with diversified themes and plugins.

But sometimes while trying to install or update a theme or plugin you may encounter a common issue where WordPress asks for FTP login credentials.

This part seems frustrating and this baffling request can be confusing and hinder the smooth content management process.

And if you’re one of those affected by this issue and looking for a solution then relax, it’s time to say goodbye to this FTP credential prompt!

In this article, we’ll discover the reasons behind this issue and share some of the easiest methods to fix your problem.

Let’s start!

What are FTP credentials for WordPress?

FTP stands for File Transfer Protocol which is a transmission path to deliver information or files between a client & a remote server. This means your website data is stored on a host server and FTP credentials give you permission to access these data directly from your computer. 

In WordPress, FTP credentials allow the user to perform actions like installing WordPress plugins /themes or even updating existing ones. It gives users the flexibility to perform changes directly, meaning no need to go through the dashboard.

FTP credentials establish a secure connection between your website and the hosting server to carry out the mentioned operations. Although this mechanism is developed to ensure WordPress security, sometimes it leads to the infamous FTP credential prompt.

Also read: How to Choose a Hosting Provider: 5+ Key Considerations

Why is WordPress asking for FTP credentials?

Remember WordPress is always concerned about the security of its user. So, whenever WordPress encounters specific file permission or ownership issues, it might ask for the FTP credentials.

This prompt appears when your WordPress site doesn’t have direct access to the files you’re trying to use. As a result, WordPress fails to write directly to the /wp-content directory when you try to execute a modification. This indicates WordPress has inadequate permission to modify files on your server.

Also, if the PHP process runs as Apache in the background instead of the owner, you might face the same prompt.

In addition, if a specific code is missing in your wp-config.php file then it can trigger this error.

Consequently, these reasons lead a user to this frustrating situation where he/she fails to install/update any themes or plugins and hampers their website management.

How to collect your FTP credentials?

It’s crucial to have the ability to access your FTP server in order to make necessary modifications in codes, themes, and other files. 

Since WordPress is asking you for the FTP credentials, you need to collect them as soon as possible. Otherwise, you’ll not be able to make the preferred adjustments.

In this case, you need to contact your hosting service provider since this has nothing to do with WordPress. 

So, follow the following steps to collect your FTP username and password:

  • Step 1: Firstly, you need to access the administrative section of your website. To do so, use the username and password provided by your website host. It’ll guide you to the admin panel. The most common control panel is cPanel but it may differ for you. 
  • Step 2: Now to access the  FTP Accounts page click on FTP Accounts which can be found under the Files menu in cPanel
  • Step 3: At the bottom of cPanel you’ll find the list of FTP accounts created for your website. You can view the username but the password is hidden. In case you can’t remember the password then click on the Change Password button to set a new password.
  • Step 4: If you don’t have an FTP account then create a new one & insert a username in the Login text field & a very strong password in the Password text field
  • Step 5: If you are creating the FTP account for yourself then keep the directory as default. But if you are creating an FTP account for someone else, you may want to limit it to your main WordPress directory. This action will prevent another account from accessing your website folders.
  • Step 6: Set the Quota field as Unlimited and limit upload file size in case you are creating the account for someone else
  • Step 7: Finally click on Create button and you can access your FTP server using the username and password you just provided. Also, you can start using FTP client software like FileZilla, WinSCP, and Cyberduck.

By following these steps you can easily access your FTP credentials which can be used to resolve the FTP prompt.

4 easy methods to resolve the FTP prompt

Fixing the FTP credential issue will not only resolve your current problems but also increase the trust and credibility of your website to WordPress. This means your site will be able to build a seamless connection with your host server making the overall content management process flawless and easier.

But how to fix it?

Don’t worry!

If you are a person with little or limited technical knowledge and are stressed to resolve this issue, just relax! It’s time to build confidence and jump into the methods we have shared in this article that’ll help you solve this problem easily.

Let’s try each of them.

Method 1: Force direct file system

If you are one of the luckiest people then the first solution that can work for you is tweaking the wp-config.php file to force the file system. It’s a PHP constant variable that’ll force WordPress to “direct” the PHP method instead of the FTP.

If you are successful in this attempt then the next time you try to install/update a plugin or theme WordPress will avoid FTP and resolve the issue.

Now to modify the wp-config.php file log into your hosting account and go to cPanel or use an FTP client to access your website files. 

wordpress asking for ftp credentials-cPanel login

Now to access the WordPress directory files click on File Manager. 

wordpress asking for ftp credentials- cPanel file manager

Next, click on public_html and you’ll discover the wp-config.php file. 

wordpress asking for ftp credentials- wp-config.php

Open the wp-config.php file and add the following code just before the /* That’s all, stop editing! Happy blogging. */ line::

define(‘FS_METHOD’, ‘direct’);



wrdpress asking for ftp credentials- force direct file system

Save the modified file then go to a browser and reload your WordPress dashboard. Then try to install/update a theme or plugin.

If you encounter the “Could not create directory” error then grant recursive write permissions to your WordPress directory as-

chmod -R go+w wordpress 

After installing a plugin, it’s important to withdraw these permissions to ensure security as-

chmod -R go-w wordpress

Method 2: Integrate FTP Credentials within the wp-config.php 

If the problem still persists after applying all the changes mentioned previously then remove the previous codes from your wp-config.php file. 

Now if you’ve already collected your FTP credentials, then you are ready to try this method but if not, follow the steps we discussed earlier to manage your FTP username and password.

Once done go to the wp-config.php file again to add the FTP credentials. This will ensure next time WordPress installs/updates files using FTP and you are free from this frustrating FTP prompt. Also, you don’t need to insert your FTP credentials every time you try to install/update themes or plugins.

So, add the following codes in the wp-config.php file:

define(‘FTP_USER’, ‘your_FTP_username’);

define(‘FTP_PASS’, ‘your_FTP_password’);

define(‘FTP_HOST’, ‘FTP.domain.com’);

wordpress asking for ftp credentials- ftp credentials integration within wp-config.php

But don’t forget to insert your FTP username, password, and FTP server address. Finally, save the file and try again. Hopefully, this will fix the issue but if it still exists then try the next method.

Method 3: Modify file permission

The problem might still exist because WordPress has limited or incorrect file permission. So, you need to modify some settings in the file manager to solve it.

To do so, sign in to your FTP client and go to the WordPress installation directory. Then go to permissions and set it to 755. Afterward, make sure to mark the Recursive option in every subdirectory.

Also, run the following commands in the server:

sudo chown -R www-data:www-data <folder_path_to_your_wordpress>

After executing this command don’t forget to restart the Apache using this command:

sudo /etc/init.d/apache2 restart

Method 4: Use PuTTY or the Web Console 

If you are a Linux user then you can solve the problem using the PuTTY client or Web Console. Just go to the PuTTY client or Web Console to start the SSH terminal and run the following code:

chmod 777 /your_domain/public/wp-content/plugins/

This command will provide you complete permission to the plugins located in the /wp-content folder. As a result, whenever you try to install/update a plugin this command will help you to bypass the FTP credentials. 

Say goodbye to the FTP prompt!

Solving the issue of FTP credentials might seem daunting initially but following the right knowledge and guidelines can help you resolve the issue and swiftly take control of your website functionality.

We hope our guidelines will help you to solve this problem and make your content management process smooth and stress-free without any interruption.

If you face any difficulties while implementing the fixes feel free to ask for help.

Similar Posts

Add your first comment to this post