Neil Turner's Blog

Blogging about technology and randomness since 2002

Fixing a blank page when updating WordPress

Screenshot of WordPress being updated

Sometimes, when trying to update WordPress using its built-in updater, I end up with a mostly blank screen. Not a completely blank one – the menu and title bar are there – but there’s no content. It’s been puzzling me for a while, and it was only today that I finally found a fix.

I run two WordPress installs. One is a dedicated single-site copy for this blog, and the other is set up as a network and holds several blogs. The single-site install happily updates automatically (which is how it should be), but the network install requires an FTP password to update. This used to be fine until I moved to the BigV server a few weeks ago, whereby I’d end up with the problem as described. WordPress would ask for my FTP details, and then, nothing.

Fortunately, this is the internet, and you are usually never the only person with a particular problem. I found this thread on StackOverflow which had the same problem, and a solution. So, if you also have this issue, add the following lines to your wp-config.php file:

define( 'FTP_USER', 'ftpusername' );
define( 'FTP_PASS', 'ftppassword' );
define( 'FTP_HOST', 'ftphostname:21' );
define( 'FTP_BASE', 'htdocs');
define( 'FTP_CONTENT_DIR', 'htdocs/wp-content/');
define( 'FTP_PLUGIN_DIR ', 'htdocs/wp-content/plugins/');

Where ‘ftpusername’ and ‘ftppassword’ are your username and password for the FTP server, and ‘ftphostname’ is the hostname (i.e. The remaining three statements tell WordPress where your install is located, to make sure it gets installed into the correct folder.

This seemed to do the trick for me, and has the additional benefit of not being asked for the FTP details every time I update.

Comments are closed.