I’m now not keen on WordPress, as it’s miles neither cloud-prepared nor serverless. That’s why this weblog runs on CloudFront and S3 and is built by using Hex. However, 25% of all web sites are proudly posted with WordPress. You may study the easiest way to run WordPress on AWS. Which includes fault tolerance and scalability.
The subsequent parent indicates the structure of a fault-tolerant and scalable WordPress environment on AWS.
Wordpress is a Hypertext Preprocessor application the usage of specific facts storages: a MySQL database and files on disk. Storing files on disk is a hassle in case you need to utilize a fleet of EC2 instances to run WordPress in a fault tolerant and scalable fashion.
The subsequent example and determine are illustrating the hassle.
Mary is uploading a brand new picture for her blog post. The photo document is stored on EC2 example number one.
Mary is reading thru her article. EC2 instance number 1 is answering her HTTP request to get the photo.
Bob is analyzing Mary’s article. EC2 instance quantity 2 is answering his HTTP request with a 404, not Observed error, because the picture is saved most effective on EC2 instance #1.
The solution, First Strive
I tried to remedy the problem of going for walks WordPress on AWS earlier than. WordPress on AWS: you are conserving it wrong describes The answer in detail.
To summarize it in brief:
the usage of a WordPress plugin to keep user uploads like pix on S3 in preference to storing them on disk.
Disabling all other WordPress features which might be writing files to disk: deploy and replace plugins or subject matters, the automobile-updater, and writing a .Htaccess report.
Automating the manner of putting in WordPress with all of its plugins and subject matters during the boot method of each EC2 example.
But not being capable of installation plugins and topics and to use the car-updater is inconvenient.
The solution, 2d Try
The Elastic file Machine carrier (EFS) joined the AWS circle of relatives in January 2016. EFS is a relatively to be had and scalable network record System that you could hook up with your EC2 instances by the usage of the NFS protocol. The suitable vicinity to outsource documents.
The subsequent figure suggests how every EC2 instance going for walks WordPress is connecting to EFS to read and write files. You don’t need to distinguish among user uploads and documents belonging to WordPress itself.