Make Server Compatible with Wordpress automatic updates and plugin installations

damainman

Well-Known Member
Nov 13, 2003
515
0
166
Greetings,

I'm basically pulling my hair out because I'm not exactly sure how to solve this problem.

I've transferred over 30 wordpress websites to my server and each one have the same issue. Before the move they were all able to install plugins and update from the Wordpress dashboard without needing FTP credentials.

Now every website is asking for FTP credentials, and even though it goes through the plugin update procedure... the plugins never actually get updated. As well as several other issues.

I'm trying to figure out where to start looking on my server to make it compatible without wordpress while not needing to use FTP to utilize the dashboard automatic installation method.

The updates work when I switched my FTP server to Pro-ftpd instead of the pure ftp server. However I would prefer not to use FTP at all and just let Wordpress do it's thing naturally.

----
My Server config is:
- Latest RELEASE version of CPanel
- PHP Version 5.2.11 w/ PHPsuexec
- CentOS
- eAccelerator+Zend+suhosin+suphp

The following PHP functions are disabled:
- dl
- passthru
-proc_open
-proc_close,
-system,
-virtual,
-show_source,
-pclose,
-posix_kill,
-proc_get_status,
-proc_nice,
-proc_terminate,
-escapeshellarg,
-highlight_file,
-leak,
-diskfreespace,
-show_source,
-ini_alter,
-ini_restore,
-getrusage,
-get_current_user,
-set_time_limit,
-getmyuid,
-getmypid

Thank you in advance for any replies.
 

damainman

Well-Known Member
Nov 13, 2003
515
0
166
Okay been doing research on other forums as well. Some people claim the Server settings that Wordpress needs to accomplish this without the FTP method via the dashboard opens up a huge security risk.

Can anyone advise?
 

damainman

Well-Known Member
Nov 13, 2003
515
0
166
Would having the libssh2 php extension installed resolve this issue? Been browsing the Wordpress files and in the "class-wp-filesystem-ssh2.php" file it mentions this.

I'm still reading multiple posts but not directly related to my issue, but very similar. Am I correct assuming that for Wordpress to use the autoinstaller without needing FTP credentials, it uses the SSH2 function?

I guess maybe if I understand what type of method wordpress uses when it is able to autoinstrall without needing FTP credentials, I might have a better idea on where to look to fix the issue on my server.
 

damainman

Well-Known Member
Nov 13, 2003
515
0
166
I finally solved the issue but I did multiple things at once so not sure which one specifically solved the situation but I'm guessing it was enabling getmyuid and getmypid in my php functions.

Basically i re-enabled these functions and removed eaccerlator.

1. pclose
2. set_time_limit
3. getmyuid
4. getmypid

Now it never asks me for FTP information when trying to update from Admin, and so far everything upgrades perfectly with no errors and no issues.

But thank you to everyone who participated in my quest for the answer lol :). Much appreciated.

Finally i can rest!! for a bit.
 

jeffyjoe

Member
Dec 10, 2004
12
0
151
I finally solved the issue but I did multiple things at once so not sure which one specifically solved the situation but I'm guessing it was enabling getmyuid and getmypid in my php functions.

Basically i re-enabled these functions and removed eaccerlator.

1. pclose
2. set_time_limit
3. getmyuid
4. getmypid


Now it never asks me for FTP information when trying to update from Admin, and so far everything upgrades perfectly with no errors and no issues.

But thank you to everyone who participated in my quest for the answer lol :). Much appreciated.

Finally i can rest!! for a bit.
where do i find these??
i cant seem to find them anywhere in order to enable/disable them
 

MikeDVB

Well-Known Member
PartnerNOC
Jun 4, 2008
220
6
68
Indiana, USA
Those settings would have been specifically disabled (i.e. if you don't know where to find them, they're probably not disabled).

More often than not WordPress not updating automatically has more to do with the server not running suPHP (so the files execute as "nobody") than anything else.

If you're running suPHP then you may have other configuration issues.
 

jeffyjoe

Member
Dec 10, 2004
12
0
151
Those settings would have been specifically disabled (i.e. if you don't know where to find them, they're probably not disabled).

More often than not WordPress not updating automatically has more to do with the server not running suPHP (so the files execute as "nobody") than anything else.

If you're running suPHP then you may have other configuration issues.
perfect thank you,, ill investigate that angle

thx mate
 

jeffyjoe

Member
Dec 10, 2004
12
0
151
Those settings would have been specifically disabled (i.e. if you don't know where to find them, they're probably not disabled).

More often than not WordPress not updating automatically has more to do with the server not running suPHP (so the files execute as "nobody") than anything else.

If you're running suPHP then you may have other configuration issues.
yup that was it, suPHP
works perfectly now thank you
 

EligonSystems

Registered
Sep 3, 2010
1
0
51
Hi,

I am having the same issue and I tried following your guidelines but still doesn't work.

It still asks me for the FTP information everytime.

Are you able to let me know where do I enable suPHP from the WHM ?

Thank you very much for your help.
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
27
143
Houston, TX
cPanel Access Level
Root Administrator
PHP handler

The PHP handler is selected in the WebHost Manager in Main >> Service Configuration >> Apache Configuration >> PHP and SuExec Configuration. suPHP is one of four possible PHP handlers on a cPanel server, in addition to CGI, FCGI and DSO. Not all handlers may be listed on all servers, depending on what is compiled using EasyApache.
 

MikeDVB

Well-Known Member
PartnerNOC
Jun 4, 2008
220
6
68
Indiana, USA
The PHP handler is selected in the WebHost Manager in Main >> Service Configuration >> Apache Configuration >> PHP and SuExec Configuration. suPHP is one of four possible PHP handlers on a cPanel server, in addition to CGI, FCGI and DSO. Not all handlers may be listed on all servers, depending on what is compiled using EasyApache.
This is absolutely correct. If you don't know how to do this without having to post on a forum you may want to look at obtaining server management from your provider, a third party, or shifting to a fully managed service.
 

spaceman

Well-Known Member
Mar 25, 2002
565
16
318
Just sharing the love... with help from a colleague we've just been able to solve this issue (or what appears to be the same issue) by installing this plugin:

WordPress › FTP Upgrade Fix « WordPress Plugins

We *don't* have suphp installed on the server in question, but with this fix, assuming permissions generally are set correctly (which they were all the time), hopefully auto-updating should become more reliable/stable.