hosting

Increase Upload limits on Rackspace Cloud

By default Rackspace Cloud Sites upload limit is set very low at just 2MB lucky this is easy to change all the way up to around 100MB per file. For the sites you want a larger PHP upload limit on simply add the following line to the .htaccess file

php_value upload_max_filesize 25M

You can also put this in a .htaccess file at the route of your account to apply the new limit to very site you host.

You can check if the change was successfully applied on the WordPress upload pages or by creating a PHP page with the following and browsing to it

<?php
phpinfo();
?>

Make WordPress Faster (on the Rackspace Cloud)


One of the problems with WordPress is it’s dynamic page structure requiring a lot of server side CPU power to build each page. This is fine most of the time but if you ever hit the front page of Digg, Stephen Fry Re-tweet you or anything resulting in a traffic spike your site will slow down or maybe even crash as your server can’t handle to load. One way of lightening the load for your server is caching pages as HTML, for this I use and recommend W3 Total Cache.

W3 Total Cache also has a number of other feature that I will go though but the big one I (and my sites) can’t live with out is the page caching. Another big help is the ability to leverage browser caching and minifying of HTML, CSS and JavaScript. W3 Total Cache has very granular controls allowing you to customise the experience to your sites specific needs.

The settings I use are as follows:

General

On the general tab I enabled page caching and minify and setting them to disk (enhanced) and disk respectively I also disabled database and object caching. I enabled CDN and choose Rackspace Cloud Files as my CDN type; I also enabled browser caching.

Page Cache

Under page cache I don’t cache for logged in user nether for 404 pages but I do cache the home page and feeds. I added a list of mobile user-agents the the rejected agents list so they can receive an optimised version and not have the mobile site cached and displayed to desktop user. The rest of the settings I left as the defaults.

Minify

For the minify settings I rewrite the URL structure and automatically upload modified files to the CDN and send error notification to both the admin area and email. I minify HTML, inline CSS, inline JS and remove line breaks but not feeds. I also minify JavaScript, combine scripts in the after <head> and <body> and before </body> as well as removing comments and line breaks. For CSS I combine and remove line breaks and comments. I have also added external Javascript and CSS files that need to be minified.

As I didn’t enable object and database caching on the general settings page I left these settings alone.

Browser Cache

On browser cache I set expires, cache control, eTag and W3 Total Cache headers, enable gzip compression under general. Cascading style sheets & JavaScript I set expire (lifetime of 3600 seconds), cache control (cache with validation for policy), eTag and W3 Total Cache headers and again enable gzip. For the HTML I only enable gzip compression.

For media and other files I set expire (lifetime of 31536000 seconds) cache control (with a policy of cache with validation), eTag and W3 Total Cache headers and again enabled gzip compression.

I left the user agent settings alone

Content Delivery Network

For the CDN settings I host the wp-includes/, theme, minified CSS and JavaScript and custom files on the CDN. I do not force over-writing of existing files and I do import external media. I configured my Cloud Files API key and container without setting up any additional CNAMES. I also enabled changed files auto upload and left everything else as default.

While these settings are optimised for Rackspace Cloud Sites most of them will be fine on almost any hosting environment.

I choose Rackspace Cloud Files for my CDN not to keep everything on one bill but because after testing I found them more consistent then Amazon CloudFront and a little cheaper for large amounts of data especially for older content that is not cached in the CDN edge locations.

Auto Update WordPress on Rackspace Cloud

This is the first in a series of how to’s regarding Rackspace Cloud Sites hosting. When I recently moved my sites over here I ran into a few problems with configuration differences and settings from my old host and in this series I will be exampling why they are in place and how to get around them.

I recently set up a new WordPress powered site on the Rackspace Cloud, I uploaded the 3.0 files I already had and planned on using the auto update capabilities of WordPress to get the latest version. However on Rackspace Cloud Sites the memory allocated to PHP is the default 8MB that PHP sets itself up with and WordPress need at least 128MB of RAM to update itself.

The solution is to add a line to the .htaccess file the site uses. Under the WordPress section of the .htaccess I added:

php_value memory_limit 128M

You could also place this in the route of your account to affect all your sites but I do this on a site by site bases as I have also increased the upload limit and I don’t want the higher limit on every site.

Hosting with the Rackspace Cloud

Recently my site was running very slow mainly due to the load my old server was under serving around 30-40 page requests a minute across a number of sites. This would lead to time out errors when some of the sites posted new content, advertisers been put off and visitor numbers falling. While I was always working to decease the server load by caching and side loading images from other servers this eventually hit a limit as well.

After hitting limit after limit I decided to move all the sites to a new hosting provider, Rackspace. With the Rackspace Cloud I am able to scale the sites automatically at low cost to well beyond what I in vision using, or at least by the time I get there Rackspace would of increased it’s infrastructure allowing me to continue growing without doing a thing. And that is the beauty of the cloud, auto scaling with massive amounts of power on tap and ready when you are.

I chose Rackspace as they have the 2nd largest cloud in the world, plus they are amongst the cheapest and have a proven track record. GDGT’s live blog is hosted on the Rackspace Cloud and during their live blog of the WWDC ’09 keynote they hit 4.3 million page views without skipping a beat, I won’t be getting that kind of traffic but knowing my host can handle that is comforting.

So far I have noticed a considerable speed increase after switching most of the sites I host over. When they advertise “fanatical Support” they really do mean it, I spent about 25 minutes in a live season talking to one of their sales people, and they weren’t all about selling Rackspace service. They suggested Amazon’s EC2 might be better for my needs, however I’d already ruled them out on price after some prototyping I did on there earlier in the year. We went through my needs and what I currently use and in the end we agreed the service was what I needed. Signing up took only 5 minutes, again in the live chat as I already had a Rackspace account.

Since signing up and moving my sites over I have used the ‘fanatical’ support again this time after moving this site across I couldn’t access the WordPress admin. The person I spoke to identified the problem as been the amount of memory allocated to PHP on my server and increased it for me, and then going on to show me how to do this myself via the .htaccess file. He also went on to show me how to increase the file upload size limits (default is 2MB).

To host sites on Rackspace Cloud you need to transfer your domain to them ($10) or change your name servers, ether way Rackspace will be handling all the DNS for the domain. I chose to change my name servers as I have domains they aren’t able to transfer. The DNS management interface is fast, quick and easy to use, I had my CNAMEs and MX records for Google Apps set up in under 2 minutes as oppose to the 10 minutes this takes with Godaddy’s DNS manager. While Rackspace also provide email for every domain you host with them I didn’t use it because all my data is already with Google.

The control panel while simple provides all the information you need, keeping you up to date with how many cycles, how much disk space/bandwidth you’ve used as well as allowing you to add more sites in less then a minute and database even quicker. While there is no one click install of popular applications like most shared hosts offer you can normally install applications manually, and often quicker thanks to the speed everything works at.

The Rackspace service is aimed at more professional users with large sites that need power and reliability, if that’s you I defiantly recommend their services, I will be posting some tips and how-to’s in the future as I move and create more sites over there.

Back to WordPress

Today I started the move back to WordPress, I decided to come back for a number of reasons. The main one been the flexibly and power of the program.

Writing my own code and theme makes the platform so powerful and allows me to do things I just couldn’t in the walled garden of Squarespace while yes I have to manage hosting and more but the flexibility of rolling my own code far outweighs the hosting requirements.

The second reason, I just missed WordPress and it’s plugins while I found ways around things I just needed those plugins I’d customised and the knowledge I have in the back end admin side.

Yet more, the real tipping point is I used to use my WordPress site as a test bed for new things and ideas I was trying before pushing them on clients.

 Scroll to top