The Best Website and WordPress Hosting01 Jul 2019
I set up an amazing hosting platform to run my business on. Now I am making this platform available to other web developers and companies who would like their site to be faster.
Everything I do uses Amazon Web Services. Here I will describe how my AWS website hosting works. This is not the full picture, though - there are a lot of other tools that I use to deliver websites that are FAST, reliable and a pleasure to use. This will give you an idea why my sites are so quick and why yours should be too.
If you are curious, check out the reasonably complex WordPress site for Couch Warriors that I set up on this hosting: https://www.couchwarriors.org, or my own site that uses TimelineCMS (not WordPress): https://www.gmacinternet.com.au. There are lots of other examples including on-line stores on my site.
So, how is it all set up?
Part 1 - A dedicated web server
The entire approach is to make every operation run in parallel on infrastructure that is most suited to each kind of task required to build a web page.
I do not load multiple websites onto one AWS server. Each website gets a dedicated server depending on what is required. The server will be an Amazon EC2 instance, an Elastic Beanstalk or an Amazon Lightsail. Different AWS instances have their own advantages and disadvantages when it comes to salability, management and performance.
Advantages of dedicated web servers:
- Each website needs the maximum CPU and network throughput to run quickly. Websites are predominantly processing code so processing speed can be the difference between visitors seeing web pages and errors.
- A snapshot can be taken before upgrading plugins and WordPress core code. Then if something goes wrong, the entire web server can be restored to that snapshot as if nothing ever happened. This is also handy if your site ever gets hacked. A snapshot can be restored within minutes and most people will not even know anything went wrong.
- If you have an application that requires (say) a web server and a node server they can be run independently but in the same group of servers at Amazon. This means they communicate with eachother almost instantly before sending the results to website vistors. Servers can be scaled up or out very quickly.
Placement of a web server is also very important. If your website uses the APIs from Google, Facebook or Instagram it is better to locate your website servers close to where Google or Facebook's servers are. If you are making a website for an overseas market then it might be faster to locate its servers closer to that market, or in several locations so that it is fast for everybody. AWS allows web servers to be in multiple parts of the world so that traffic is not being transmitted over long undersea cables that result in slow connect and response times. This kind of flexibility is very powerful but normally overlooked in planning.
Part 2 - A separate database server
I never put a website's database on the same server as its software. This is the main way that hosting providers keep their prices down. Dedicated database servers are a lot more expensive than web servers.
Advantages of a separate database server:
- Databases have different requirements to servers that run software. The main difference is that a relational database like MySQL or Postgres needs a lot of RAM to join tables. If you go low with the RAM (as cheap web servers often do) then the time your server spends swapping memory pages between hard drive and RAM will slow overall website performance down.
- If there is a problem with the web server code (for example, your WordPress site gets hacked) then it can be restored from the last known good snapshot. That may have been a long time ago. If the database is included in that snapshot then you will lose all changes made to it since the snapshot was taken. Different servers mean different backup strategies can be employed for things that change regularly (data) and for things that change rarely (code).
Part 3 - File Storage with versioning
Finally, I set up your website so that images and attachments are in an Amazon S3 bucket. I give it a subdomain to improve SEO performance and so that the contents can be cached by a Content Delivery Network for blinding fast speed. Setting up a bucket is one thing, but setting up AWS IAM roles and permissions is another thing entirely. Most hosting providers will not even provide this option for that reason.
Advantages of separating files from processing:
- Images and documents on a website are stored in an S3 bucket with a subdomain pointing to it so that a Content Delivery Network can cache the contents and deliver them more quickly to site visitors.
- I set up S3 buckets so that all versions of a file are kept forever. If you accidentally delete an image or PDF, I can get it back for you. If somebody makes a change that you do not like then I can restore a previous version.
- Your web server does not have to handle or send your images or attachments. That means it has more bandwidth available to send out HTML and CSS, and more CPU time available to create web pages.
- It is fast. Extremely fast. Especially when combined with a Content Delivery Network like Cloudflare or Amazon's Cloudfront.
The end result for each website is a file storage bucket, one or more web servers plus a database server. I then put a Content Delivery Network like Cloudflare in front of it all to handle burst traffic and protect from internet threats.
That diagram looks complicated but that is how a modern website is built for security and speed. You may not need everything (yet) but you can relax knowing that if your site needs to be scaled up or out everything is ready to go. The right tool is used for the right job at every stage of delivering web pages.
I created this platform to serve my business websites and the sites I host for my customers. I know it works. It has proven to be very reliable, and is extremely fast.
Now this hosting is available to you. I will set everything up and keep it running. You just have to work with WordPress. You get the best hosting available without having to worry.
I am not interested in poaching your websites or customers. That is not what I do. You can come to me secure in the knowledge that I am here to help you give your customers the fastest, most reliable websites possible.
Of course you can set this up for yourself, but Amazon Web Services can get complicated. I have done AWS Certified Developer courses and have a lot of experience with website hosting on their platform. Let me do it for you. You will save yourself a lot of time and energy that you can spend on making awesome websites instead.