I hired a sysadmin to set up a VPS server for me and, unfortunately, it looks like things were not set up correctly. When trying to install and update plugins, I run into permissions errors all the time. WP Super Cache is the main issue as it causing my readers to run into 502 errors. Currently, my site does not load pagination (no Page 2, Page 3, etc..).
12/1 Update: The apache server has restarted itself multiple times today and in the past 3 hours since my request to the host provider, all I’ve got so far is that they are monitoring it. And it has restarted since they began monitoring too…
The sysadmin that set up the server mentioned that in order for it to work properly under DSO mode, wp-admin, wp-content and wp-plugins folders would need to be changed to 777 permissions. The only problem is that I still couldn’t get a 3.0.2 upgrade to work under those settings today (504 timeout nginx error this time) so I’m still concerned about running it that way for many reasons.
I’ve been told that if I run under PHP mode though (think that’s right?), that I will hog up more RAM with queries, etc and I’m already at 60% usage in DSO mode. This doesn’t make any sense to me because my blog ran a little slow but still ok without any downtime on shared hosting. I’m now on a very reputable VPS w/ 512MB ram and my site only gets 10-12k pageviews a day.
The host said that they have tweaked the config to optimize ram so I don’t think anything is set incorrectly. Still trying to figure out what is going on here.
Developing…..
It’s a very loaded question, I’ll try my best here, keep in mind it’s 4am, so I’m just giving you highlights, not detailed explanations.
Linux I’m assuming you’re using a recent version of Ubuntu
You can do some other things as well, like install Shorewall, or UFW for better firewall management, install Nginx as a reverse proxy to apache, tweaking the query cache, but this really depends on a whole bunch of other things, and you should tweak mysql settings after being in production mode for a few days.
At the risk of not answering the question (which Vid did quite well), may I suggest that you switch to a VPS host that offers to do the system administration for you (usually at no charge).
I’m thinking of http://hub.org specifically. Marc (the guy who runs it, and one of the original four who created PostgreSQL) is the best system admin I’ve ever come across.
Hub’s control panel (it’s not CPanel) is being redone as I’m writing this; its merit is to feature only what end users are supposed to be worrying about. The rest, in essence, is subject to opening a support ticket and requesting that it be taken care of. (Of course, you can do whatever you feel like it as root if you know your way around the shell…)
Oh, and… I should mention that Marc is the kind of guy who actually digs into your scripts and points the bug out if he suspects that is what is triggering server issues. I know of no other host who does that…
Some Ideas:
I don’t like WP-Super-Cache because it does not really solve the problem of slow dynamic page generation times.
If you have a dedicated server only for wordpress I would not make any compromises:
nginx+php-fpm (you can also use Apache with fcgid and suexec (this also solves most of the permission problems)
Install the APC opcode cache
Use the apc cache backend: http://wordpress.org/extend/plugins/apc/
Install batcache for a page-cache it will use the apc backend.
.
Configure the MySQL query cache and take a look the key_buffer value if you are using MyISAM tables or the innodb_buffer_pool_size. If you are having a lot of comments/updates to your blog consider using InnoDB as a storage engine.
On a heavy used VPS I have about 150ms page generation time for dynamic pages (not cached before) and if batcache delivers the page it is only 1ms. So you can serve up to 200-300req/s with a “normal” VPS.
This is a common problem when running PHP as a DSO or mod_php. When running this setup the WordPress files must be owned by the same user PHP is running under. Usually it will be nobody or for Debian / Ubuntu www-data.
To fix chown the whole WordPress directory by running the following from the command line:
$ chown nobody:nobody blog/ -R
If WordPress is installed in your root public directory then it would be:
$ chown nobody:nobody public_html/ -R
You can set your file permissions at 644 and directories at 755