This post was sponsored by Pantheon. Thank you for supporting the sponsors who make SitePoint possible!
Consider the typical tasks involved when deploying your WordPress or Drupal website to a new web host…
- Sign-up and create a new environment.
- If you’re using a dedicated or virtual server, install and/or configure a web server, PHP, MySQL and other dependencies.
- Create a new database with a user ID and password.
- Upload several megabytes of application code.
- Edit the application’s configuration parameters.
- Run the installer process.
- Upload, install and configure third-party themes and plugins.
- Add your content.
- Test. Swear. Hit your keyboard. Fix the problems. Repeat testing again.
- Redo the whole process for your test, staging and production environments.
And then your problems really start…
- Updates can be difficult to deploy everywhere
- A traffic spike caused by a popular article or advertising campaign can bring the server to a halt at the worst possible moment
- A DoS attack can be catastrophic for every site hosted on the same environment
- The website is difficult to scale as you grow
- Hardware and software updates can cause outages or compatibility problems.
The process may be manageable for a couple of installations but consider hosting a few dozen websites – or thousands. Managing multiple WordPress or Drupal sites is time-consuming, tedious, error-prone and prevents you away working on tasks which add real value.
Can Cloud Hosting Help?
To some extent, yes. However, cloud hosting typically requires one or more separate virtual machines for every site. VMs are large, expensive and still rely on significant hardware resources to scale effectively. The traditional approach to scaling also requires considerable manual intervention by systems administrators or DevOps. Modern Infrastructure-as-a-Service providers such as AWS and Rackspace make it easy to provision new VMs to handle additional workload but someone, somewhere needs to stitch those additional servers together. Deployment takes time – and that may be too late for your traffic spike.
Step One to Saving Your Sanity: Use Version Control
If you’re not using version control it’s time to start. Git is a great choice but any solution is better than none. Version control can be used to create a stable deployment process to improve your workflow. Ideally:
Team members will have access to their own, separate development environments which allow them to update or create new features on separate code branches.
Content – such as your WordPress pages, posts and images – are synchronized from the live environment to all development and staging systems. The team can then work against an accurate snapshot of reality which is critical for a full understanding of the system.
Automated quality-assurance tests ensure new code is tested prior to deployment. It should be impossible for problematic features to reach the live server.
Step Two: Consider a Website Management Platform
A what? Website Management Platforms are a new concept. They’re similar to cloud-based Platform-as-a-Service (PaaS) hosts such as Heroku or Cloud Foundry. However, a WMP is purpose-built for a specific application such as WordPress and Drupal rather than a development environment such as PHP or Ruby.
The leader in this field is Pantheon, a company that implements hosting and scaling in a new way. Rather than rely on heavy VMs, sites are constructed on lightweight containers abstracted from the OS and hardware. Only the application is included – not the whole guest OS, PHP, MySQL or other dependencies. WordPress and Drupal applications can then be managed from Pantheon’s dashboard.
Pantheon has created an infrastructure named the “Runtime Matrix”. This executes your site’s code across hundreds of powerful servers which serve millions of containers. Intelligent routing, load balancing and advanced caching and security services are included as standard. The service also includes Pantheon Content Base which manages databases, files and version control more effectively.
Pantheon’s Website Management Platform has a number of advantages including:
1. Fast Provisioning
Containers are provisioned using software which means they can be added or removed very quickly. Idle sites, such as development containers, are effectively deactivated until a new request is made. The largest websites in the world — like Google, Facebook and Twitter — are managed through software, not by manually adding and configuring new VM’s, servers and services. Software-based provisioning removes human error and greatly increases the speed of new services coming on line. A Website Management Platform quickly provisions all the required services so sites can scale out quickly to handle peak loads with minimal human intervention.
2. High Availability
High availability means guaranteed uptime even when services fail. One compelling aspect of Website Management Platforms is the ability to handle redirection of traffic and service requests to known working services for code execution, content requests, db…. The multi-tenant, high-availability values introduced by salesforce.com, gmail and Heroku are now finding their way into website management, where a dedicated team of platform engineers deliver services that most companies would not be able to build and manage on their own.
3. Effective Scaling
Your site can scale quickly from a few hundred daily page views to millions without downtime or maintenance. Unlike VMs, no reconfiguration or rebooting is required, no matter how much the demands on your website increase.
Every WordPress or Drupal application container is identical. Your development, staging and production systems cannot go out of sync because they all share the same distributed content base, configurations and performance characteristics as the live site.
5. Better Security
Website attacks have become increasingly frequent. The Website Management Platform is continually monitored by security experts and designed to prevent Denial of Service, network intrusion, payment card fraud, virus and other attacks.
6. Better Performance
Infrastructure with a single purpose can be highly optimized to serve that purpose. A Website Management Platform is built to deliver content over across the web. Compared to traditional hosting, where the workloads and development languages vary widely, Website Management Platforms can optimize every interaction, from browser to runtime engine, to speed up content delivery. Every aspect of the platform is optimized and tuned to deliver the best possible response times for websites. Your site will remain responsive regardless of demand.
7. Fewer Headaches
You can forget about hosting and deployment and concentrate on more interesting daily web development tasks. Pantheon claims to have the largest Drupal infrastructure in the world which runs more than 1,000,000 containers for clients including Cisco, Dell, Arizona State University and The New Republic. WordPress support has recently been added and is likely to be even more successful based on the lack of enterprise-grade hosting options for WordPress websites.
Of course, it’s difficult to appreciate the benefits a Website Management Platform can offer until you try it. Fortunately, Pantheon offers a free account so you can assess the service then upgrade as your website evolves. For more information about Pantheon’s Website Management Platform and to get the free eBook, Drupal Hosting is Dead, visit pantheon.io.
Craig is a freelance UK web consultant who built his first page for IE2.0 in 1995. Since that time he's been advocating standards, accessibility, and best-practice HTML5 techniques. He's created enterprise specifications, websites and online applications for companies and organisations including the UK Parliament, the European Parliament, the Department of Energy & Climate Change, Microsoft, and more. He's written more than 1,000 articles for SitePoint and you can find him @craigbuckler.