July 17, 2009
Upgrading WordPress
In the last couple of days, I’ve upgraded 4 different WordPress installations — across local and production servers, including 2 WordPress µ. Local servers are ok to upgrade, production servers are a pain.
Everything went pretty smoothly, except this blog…
The FTP connection kept on failing, and not uploading all the files. Some files got half uploaded, and things just didn’t work out nicely. The whole process took forever, because of the huge number of files (it takes longer to upload a lot of small files than one big file). When I thought it was finished, I later found out that not all the wp-admin files got uploaded properly.
By then, I was really frustrated with the whole thing, so I just deleted all the wordpress files (except wp-content of course) to start all over again. I was going to just upload the whole archive file together, and un-compress it on the server, but uploading that failed half-way as well.
In the end, I just uploaded all the files almost one-by-one, which wasn’t fun (it was more like 5 at a time, because that turned out to be reliable as well). Maybe I should stop being such a cheapskate, and use a paid web host instead… with reliable FTP.
That’s not all…
Another issue I had was I found that if you tried to visit my blog during all this, you were served a page with a bunch of random WordPress PHP code printed out. Imagine if it printed out your hard-coded database password or an API key or something similar. That could turn out badly. How should you upgrade websites securely? Maybe next time I will change the .htaccess file to block all requests and show an “upgrading…” page. Is there a better way of doing this?
What are the other servers you updated, and what does production mean?
The other server I updated was the new Citylife Church website I’m working on (which uses WPMU). ‘Production’ means servers that are public and used for serving your website. ‘Local’ servers are on your own local network, and are private and only used for testing and development.