Skip to main content

Install & update WordPress plugins without FTP [Quick Tip]

install & update WordPress plugins without ftp

Sometimes, when you install & update a WordPress plugin, WordPress will only prompt you for your FTP connection if it cannot write to 

 directly.  In this post, we’re writing about how to install & update WordPress plugins without FTP.

install & update WordPress plugins without ftp

If your web server has write access to the necessary files, it will take care of the updates and installation automatically. This method does not require you to have FTP/SFTP or SSH access, but it does require your to have specific file permissions set up on your webserver.

It will try various methods in order, and fall back on FTP if Direct and SSH methods are unavailable.

Read: https://github.com/WordPress/WordPress/blob/4.2.2/wp-admin/includes/file.php#L912

WordPress will try to write a temporary file to your 

 directory. If this succeeds, it compares the ownership of the file with its own uid, and if there is a match it will allow you to use the ‘direct’ method of installing plugins, themes, or updates.

Now, if for some reasons, you do not want to rely on the automatic check for which filesystem method to use, you can define a constant, 

 in your 

 file, that is either 

 and it will use that method. Keep in mind that if you set this to ‘direct’, but your web user (the username under which your web server runs) does not have proper write permissions, you will receive an error.

Solution to install & update WordPress plugins without FTP

If you do not want to (or you cannot) change permissions on wp-content so your web server has write permissions, then make the changes following the instruction:

  • Edit wp-config.php
  • Add the code below to the wp-config.php:

For more details, refer here.

Don’t hesitate to give the comments below if you have any questions 🙂

Install & update WordPress plugins without FTP [Quick Tip]
4.4 (88.57%) 7 vote[s]