Wordpress plugin tip (automatic install)

Every day solutions to every day challenges. + Brilliant stuff

Moderators: b1o, jkerr82508

Forum rules
Please feel free to post your tip it does not have to be advanced. Also ask questions directly related to the tip here. But do not start new threads with questions or ask for help here. That is what the help section is for. forum rules: http://bjoernvold.com/forum/viewtopic.php?f=8&t=568
User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Wordpress plugin tip (automatic install)

Postby viking60 » 28 Mar 2014, 11:14

I installed the CMS/PHP framework Wordpress on the nginx server I had set up under Manjaro Linux. This went just fine: Wordpress worked out of the box where the competitor - Concrete - did not (otherwise I would have preferred Concrete - but "just works" is nice too).

I was happy with it until I got a message that one of the plugins needed an update. I clicked update and expected a download and automatic install.
But no - I had to provide my ftp connection data and ftp password!
Image


They promised not to store the password etc but I simply do not like to provide data like that - (call me paranoid for no apparent reason :arrogant: ).

There must be a way to simply download the plugin and install it without me having to provide those data? So I dove into the code to hack my way through it:

In the config file in the root of the wordpress directory I found a way.
The file is wp-config.php , and at the very end of that file I added this:

Code: Select all

/**Setting up direct download and installing of plugins without providing ftp data   */
define('FS_METHOD','direct');


When my dashboard gives me notice that there are updates to my plugins now I simply click it and the update gets installed.
This is nice for installing additional new plugins too.
Just click the plugin et voila:
:A
Image
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

Return to “Tips & Tricks”