Building a WordPress virtualization solution using LXD/LXC containers
WordPress hosting is hot, and if Google Trends is anything to go by, it’s only getting hotter with each passing day. Most web hosting providers now offer specialized WordPress hosting packages, and some even focus exclusively on WordPress hosting.
Perils of WordPress hosting using shared servers
Many companies such as online publishers, internet marketers and web hosts use shared hosting to host WordPress websites. It is the most cost effective way, but shared servers pose several challenges in ensuring security, performance and scalability.
In a shared server, each website is like a window to the outside world. If the security of even one of these websites is weak, attackers can get into the server, and infect all other sites hosted in it.
There are even cases of hundreds of sites in a single server infected with malware, and blacklisted by Google.
Shared server security can be tricky. Unlike a VPS, or a dedicated server, a website in a shared server uses the same Apache, MySQL and Network service as any other site in the server. So, if an attacker gets access to any of these services, all other sites are well within reach, and can be infected. To prevent such issues, our engineers enforce strict account isolation, malware filtering, and conduct daily security audits. If not, these sites would be hacked in no time.
Sr. Systems Engineer, Bobcares
[ Get the best setup for your WordPress hosting services! Our hosting support specialists will setup the ideal server infrastructure for your business. ]
Security vulnerabilities are only a part of the story. Shared servers are known to be affected by frequent performance issues.
Performance issues are a major concern in shared servers. It is common for individual accounts to run resource intensive operations like backups during peak traffic hours. It can lead to high resource usage, and slow page load times. We prevent these issues in our client’s servers by using resource limits, blocking resource intensive plugins, and helping webmasters optimize their sites.
Member of Executive Team, Bobcares
Slow adoption of latest technologies
Another common issue faced by many shared hosting providers is the limitation in providing customized sever environments. What if one customer wants Percona as the database instead of MySQL, or a few customers want HSTS support in Nginx?
There’s no easy way to do it. These customers will have to be migrated to a VPS or dedicated server, and left to fend for themselves.
“New technologies come out all the time” Sojish says. “It is important for a WordPress host to remain current, and support latest systems such as HHVM, or PHP7 or HTTP/2.
In shared servers, it is difficult to quickly switch to new technology because there might be many whose site functionalities depend on old technology.”
An alternative to shared hosting
With proper server management, shared hosting is definitely a good platform for WordPress hosting. However, many companies want better customizability and isolation than what’s offered by shared hosting.
The alternatives are dedicated servers and VPSs, and many hosts find both to be too cost prohibitive. Here’s where light weight virtualization technologies can bridge the gap.
Traditional VPS hosting systems such as Xen or KVM create independent server images for each account, which is quite resource intensive.
In contrast, light weight virtualization systems such as Docker, OpenVZ or LXC uses a single server image to handle multiple clients, thereby maximizing customer density per server.
Today, let’s take a look at how LXD/LXC can be used to build a cost effective WordPress hosting system.