Amazon Web Services (AWS) provides an excellent scalable and cost-effective cloud platform that can be used for hosting a WordPress site. You can get started by using a pre-configured Linux image that already has WordPress and several important plugins installed and ready to use. If you search for “wordpress on amazon aws” you will likely find this helpful step-by-step guide in the AWS documentation to get you started with the Bitnami stack. However, if you’ve already followed the steps in that guide, then you’ve already found that several more steps are required. Also, the guide leads you to set up a server that cannot be connected to via FTP or telnet! The guide below expands upon the AWS documentation to get your full WordPress site up-and-running (and the ability to connect and administer the server instance) so that you can get to publishing!
- Get a Domain (optional) – If necessary, the first step to take is to get a domain for the new site. I prefer to use Amazon to purchase domains to keep management simple and to take advantage of Amazon’s DNS Service. Route 53 is a premium DNS service that provides highly-available and scalable domain name services for your domain.
- Registration of domains on Route 53 is $12/year and will automatically renew by default.
- Route 53 domain registration includes private registration for free! Private registration allows you to keep your address and other required information private, but most other domain registrars will charge you extra for this service.
- You can view this list to see all of the top-level domains that you can register on AWS. There are a lot more available out there than just .com, .net, and .org.
- Create a Key/Pair – Creating a Key Pair is what enables you to connect to your EC2 instances via ftp or telnet.
- If you followed Amazon’s guide, they’ll tell you not to create a key/pair. I imagine this is just so their guide is easier to follow, but you do want to be able to connect to your servers, right?
- You can create a key/pair later in the process, but I find it is helpful to create it early so you can easily select it when you are setting up your new EC2 instance.
- Create Amazon EC2 Instance – Read the bulleted notes below and then head on over to Amazon’s Launch a WordPress Website guide and follow all the steps to create your server instance with the WordPress stack fully installed.
- In Step 6 of the AWS guide, associate the new key/pair so you can connect to your instance.
- Make sure to get your Bitnami password as is described in the tutorial and save it in a safe place. You’ll need this for logging into your WordPress website for the first time, but you’ll also need it for connecting via FTP later down the road.
- Make sure you also save your .pem key file in a safe place. You will NOT be able to retrieve it again from AWS, so if you lose it you’ll be forced to create new keys.
- Map Your Domain to Your New EC2 Instance – In order for end users to find your website on the internet, you’ll need to map your domain to the IP of your new EC2 Instance.
- Use these steps to obtain an Elastic IP.
- Use these steps to create DNS Record sets so that your domain points to the IP of your new EC2 instance.
- Convert Your .pem Key File to .ppk Format – In order to connect to your server via FTP or PuTTY, you’ll need to have your key in the .ppk format for a secure SSH connection.
- Use PuTTYGen to Convert PEM to PPK file format
- Disable Bitnami Banner – If you’ve loaded your site in the browser to see what it looks like, you’ll notice a banner in the bottom-right corner of the screen. Clicking on the banner leads to a help page for administrators. There is a lot of good info on the page, but you don’t really want end users to see this. Use the next two steps to disable the banner.
- How to connect to your instance via Putty: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html?icmpid=docs_ec2_console
- Once connected via SSH, run the following command:
sudo /opt/bitnami/apps/wordpress/bnconfig --disable_banner 1
- Create Admin User – The bitnami image comes with a default user that can be safely deleted. You can then create a new user with admin rights to configure your site and start creating content.
- Login as the default user (refer to the Amazon Guide Step 3)
- To create a new user with any username you prefer, go to your WordPress dashboard, select “Users” in the left-hand navigation, the click “Add New”. Fill out the required fields to create your new user.
- IMPORTANT: Make sure to set the new user’s role to “Administrator”
- Log out and then log back in with the new admin user account you just created.
- Delete generic “user” created by Bitnami and feel free to delete all content associated with the user as well.
- Create a Local Copy of Your Site Files – It is a good idea to create a backup of all your site files locally so that you can make changes and test them locally before pushing them.
- The Bitnami image security settings prevent using the WordPress Editor to edit CSS and site files, so FTP is the best way to go.
- Use this guide to connect to your instance via FTP and download your site files.
- Configure and Update All Plugins – The Bitnami image comes with several plugins pre-installed. For each plugin, decide if you want to enable or remove it. If you enable the plugin you should also update it to keep your site secure.
- If you enable Akismet (recommended), you will need to get an app key from Akismet. The plugin will direct you how to do this. One API key can be used for multiple sites with the Akismet plugin.
- If you enable All-In-One WP Migration, you will need to fix a permissions error. To do this, use FTP to create the folder that causes the error (you’ll see the folder path in the error message) and then give the folder full permissions (777). Note; I’ll be posting a more thorough explanation of this soon.
- If you enable Google Analytics, you’ll need to create a Google Analytics account. The plugin should instruct you for how to do this.
- If you enable JetPack, you’ll need to create a wordpress.com account. One wordpress.com account can be used for multiple sites with the JetPack plugin.
- Make a Site Backup – Using the pre-installed All-In-One WP Migration plugin, you can make a backup of the WordPress site data and configuration. There are more complex backup options as well, but this is at least a good start to make sure you can restore or migrate your site if you need to.
You Now Have a Functional, Scalable, WordPress Website Running in the Amazon Cloud
As you can see, there are quite a few steps to get a site up and running beyond what the basic Amazon guide shows you, but it can be done within a couple of hours. There will be even more to do depending on what types of features you want on your site but this should at least get you a base to start with that has a fully functional WordPress with analytics, security, backups, email functionality, SEO features, and more! Once you are done, you’ll have a fully functioning WordPress site in the Amazon cloud that is easily scalable and that can easily access other powerful features of Amazon Web Services.