If You Are on Dreamhost PS – Do this
You are just on Dreamhost PS. It means that you spent some quality time and your website made some progress. You faced some problems with the website performance and turned to support and they told you to move to Dreamhost PS. You did. Good enough. You have got cool graphs and all these bars which scare you now by showing some quality rise in the RAM and CPU usage. Here you want to customize and change things a little bit to keep the RAM usage for your server down to save some bucks every month. Some stuff relating to plugins here can apply to any other web host also.
Play with PHP version
There are two versions available in the panel (domain edit section):
Use mod_php5.2x instead of php5.2x in domain edit section. You can find this in manage domains section. Edit a domain and there you will find this option. For some people mod_php5.2x will control things a little bit and keep RAM usage low. For some if they select this option, website will simply cease to work and show some errors. Try this option and see if this works for you. If you select mod_php5.2x, FastCGI Support (via mod_fcgid) option will be turned off. ormally in shared hosting environment in Dreamhost FastCGI support is enabled which helps in better performance of website but I have read about it that mod_php5.2x is better which you get in your PS package.
Improve php performance with a compiled code cache (XCache). This only provides any benefit for websites using mod_php or FCGID. In the Server settings section do enable Xcache. Then go in the domain management, select domain and enable XCache support for PHP for that domain. By enabling Xcache your website will perform even better.
Do not use WP Super Cache Plugin
If your account is on a Private Server, there is a known bug where setting this plugin to “On” can drive up the amount of resources you are using.
Doing the followings stuff seems to keep the CPU and memory from spiking uncontrollably.
Visit your domain’s settings and turn on “Use FastCGI for all PHP?”
Use it ‘half on‘ (WP Cache), Do the Supper thing off.
Do not use it at all. Use some alternative.
A good alternative is Hyper Cache. I can recommend you DB Cache as well but that will cease your Tags to be saved. Otherwise DB Cache should be a good plugin. May be you can turn it off while publishing and writing posts and after you are done turn it on, until you next time write a new post.
Turn off Post Revisions
WordPress introduced a new feature that has proven handy for some: post revisions. While these are totally sweet to have, some databases can balloon a bit if you’re prone to making a lot of changes or spending a lot of time cooking up a post. To help keep your database size down — which keeps your install speedy — you might want to fine tune the amount of revisions your site saves. Either turn these off or use some plugion to control these.
One good plugin for that is Revision Control plugin.
If you don’t want to add another plug in to your WordPress installation then you can run a simple SQL query to remove revisions. Login to your phpmyadmin and select your WordPress database. Once done, click on the SQL button to open the SQL command window.
Paste the following SQL command in the SQL window:
DELETE FROM wp_posts WHERE post_type = "revision";
This will remove all revisions currently stored in the database.
Open wp-config.php file from your blog and add the following code in there to disable post revisions:
<?php define(’WP_POST_REVISIONS’, false); ?>
Set Auto save interval to a higher time limit
Blog saves the post after some seconds. Increase its time a bit in seconds to keep server from overloading. Use this code in wp-config.php file.
<?php if ( !defined( 'AUTOSAVE_INTERVAL' ) ) define( 'AUTOSAVE_INTERVAL', 1200 ); ?>
Do something strong for Anti-Spam
Do not use heavy plugins
Plugins like WP-greet box which monitor every visitor at every single post and displays a welcome message to subscribe by informing them that from where they came at your post is obvious increase in server load. Use Google Analytics instead of heavy stats plugins. ‘SEO smart links’ and ‘Simple Tags plugin’ can also prove heavy.
Problem with the XML-Sitemap Plugin
This is very common plugin and most of bloggers are using it. There is a setting in that which says:
“Rebuild sitemap if you change the content of your blog”
If your blog has many posts then imagine everytime you hit publish button, blog rebuilding XML sitemap file and gzipped file can add up more resources consumption. Instead of that, turn this feature off. Rebuild sitemap, lets say, after every 20 posts manually or once in a day manually by going in XML sitemap area and clicking at the link which says rebuild the sitemap.
Experiment a bit. Turn things off and on and see the change in the server resources consumption.
The ‘WP Super Cache’ thing, mod_php5.2x, FastCGI and XCache thing are really considerable. While some other stuff here can apply to any blog at any server too, to decrease server resources consumption. If you are on Dreamhost read the following as well:
I have been at Dreamhost shared hosting environment and just moved to Dreamhost PS. Its pretty good if you follow some caution. It feels good to see all your visitors landing at your posts safely and not at ‘500’ – internal Server Error. If you are at Dreamhost and having ‘Internal Server Error’ in admin area and while browsing your blog, then, my friend! It is time to upgrade. I am going to share more stuff about Dreamhost PS in coming posts. e.g. When do you need Dreamhost PS? What is its downside and what is good about it?