Category Archives: Wordpress

Moving WordPress from shared hosting to a VPS – requests credentials for updates

I recently moved this wordpress installation from a reseller cpanel installation to a virtual private server (VPS) using a cpanel full backup and restoration. Everything went smoothly until I decided to update wordpress and was greeted with the following message.

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

The solution was to change the configuration of PHP and SuExec to have suphp act as the PHP 5 Handler instead of dso.

Confirmation that the setting has been changed.

Refreshing the upgrade page where the credential error occurred and within seconds the upgrade has been performed!

 

 

Fatal error: Call to undefined function get_userdata() …… /wp-includes/capabilities.php on line 488

WordPress 3.1.1 site was down with error

Error establishing a database connection.

Checking the server logs showed memory errors

[Fri Apr 15 18:03:41 2011] [error] [client xxx.xx.xxx.xx] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/……/public_html/index.php, referer: http://www.google.ro/url?………
[Fri Apr 15 18:03:20 2011] [error] [client xx.xx.xxx.xx] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/……./public_html/index.php
[Fri Apr 15 18:03:20 2011]  [error] [client xx.xx.xxx.xx] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/……./public_html/index.php
[Fri Apr 15 18:03:20 2011] [error] [client xx.xx.xxx.xx] (12)Cannot allocate memory: couldn’t create child process: /opt/suphp/sbin/suphp for /home/……./public_html/index.php

A reboot of the VPS cleared the memory error however this error appeared in it’s place

Fatal error: Call to undefined function get_userdata() …… /wp-includes/capabilities.php on line 488

A repair of the mysql database didn’t fix this problem. Googling the error didn’t come back with anything useful either.

Testing with another browser allowed most pages to come up without this error so it appeared to be something to do with the other browser having a cookie for the admin user which corresponds to the error about get_userdata.

Deleting the admin user (the only one) from the wp_users table allowed both browsers to view the site.

Recreating the user with the same user_pass and other details allowed both browsers to view the site so there was a problem with the wp_users table preventing the site from operating.