In this tutorial, we’ll step through how to install and run Wordpress on Amazon Web Services in a way that means your data is safe, your site is fast and your hosting grows and shrinks in-line with how busy your website is, using Elastic Beanstalk for devops, Aurora for database and Elastic Filesystem for upload storage.
If you’re coming from a traditional VPS/shared hosting background, AWS can be a bit scary. It’s not, it’s just a little bit different and you have to do a bit more of the legwork yourself to get everything going the way you want it to.
Whenever we’re going to be using a Terminal in this tutorial, the text will be styled like this. Bear in mind that you will have to press enter/return after each bit of terminal input.
You’ll need to have an account with Amazon Web Services to get started. It’s easy enough to do, they do usually put a verification call through to you when you sign-up so this can take a little while to get going.
If you already have an AWS account, take a moment to give yourself a high-five. You’re winning! If not, go ahead and create an account.
You’ll want to have your source code in a folder on your computer, managed using Git. If you’re already using Git, that’s also awesome. If not, you’ll want to install it, either for Windows or Mac.
Git is like a versioning system for files. If you think about a paper form, like the (endless) ones that the bank make you fill out when you apply for a mortgage, Git would be a bit like a system that you use to store a form in each stage of it being filled out (if you’re like me, probably over the course of a few days; procrastination and paperwork go hand in hand).
The upside of Git is that when you inevitably make a mistake filling out said form, you can go back to a previous version really easily. It’s also the thing we’ll be using to store our code so that the other bits of Amazon Web Services we’ll be sending it to can make sense of any changes in it.
git --versiongit config --global user.name "John Doe"git config --global user.email "[email protected]"We’re going to use our new-found Git awesomeness to manage our code. It’s fairly straightforward, but there’s a few commands we need to run to make sure Git knows where our code is and how it should manage it.
I’m doing this on a Mac – the Windows commands should be identical other than things like changing directory which is “cd” on Mac and “dir” on a PC.
I’m going to be using a fresh copy of Wordpress that I’ve downloaded, unzipped and put on my desktop.
cd ~/Desktop/wordpressgit initgit add -Agit commit -m "initial commit"git status