I recently decided to make a new site to share and showcase my vacations, https://myawesome.vacations! I wanted something a little more modern, and in depth, than these blog posts here on brentsowers.com (which are hosted on blogger.com). After researching options out there, Wordpress is by far the most widely used system to make your own sites - from simple blogs to much more complex stores.
What is Wordpress?
Wordpress is free and open source content management system (CMS). It's basically a full web site building and management system written in PHP for you to manage the content. It has many plugins that are easily added. Estimates range from 25-40% of all web sites use it! Basically - you can download the source code for the skeleton to start your site with the management console for free. It needs to be hosted somewhere though - it's a full web application that needs a web server and database (which... I'm going to explain how to run a site without that). Because of that, you need it to be hosted somewhere.
Wordpress Hosting Options
There are a LOT of options out there for hosting a Wordpress site. Let me briefly list a few that I looked at:
- Wordpress.com - essentially the default choice. They have a lot of options here. There is even a free option, although you can't use your own domain name - it's yoursubdomain.wordpress.com. The "personal" option is cheap ($4/month as of July 2025), but does not allow plugin installation. The cheapest option that allows plugins is the business plan at $25/month (as of July 2025). So I discounted it because I want my own domain and want some more control than it gives.
- EasyWP - This is a hosted Wordpress solution from namecheap.com (who I use for my domain names). So I looked a bit at them. It appears like a good solution - you can easily use your own domain (easier if it's from namecheap). The cheapest option is $6.88/month (as of July 2025), and you get a decent amount of storage. There is a limit on traffic - you only get 50,000 visitors/month, but if you are just launching your site, that's probably not going to be an issue. The reason I didn't use them is, after reading up online about them, the site performance is terrible if you get heavy traffic. It's fine with low traffic, but the site takes seconds to load if you get a lot of traffic.
- Amazon Lightsail - Because I already use Amazon web services (AWS) for my other site - coordinatecommons.com, I looked around at what AWS offers. There is a whole service to set up and host a Wordpress site. Full dislclaimer - I didn't actually try setting one of these up, I'm getting my info from what other videos and posts show. Once you have your AWS account set up, just go through the guided process to create a Wordpress instance. But there are a good number of pretty technical things it looks like you need to do - which isn't an issue for me, but may be for others. It's $5/month (as of July 2025), and as far as I can tell, you can install your own plugins - you can do whatever you want with the source code, or just use the management interface in Wordpress. So I was going to use this, but I thought, why am I going to spend $60 every year on a site that will probably get virtually no traffic?
- Static site hosted in AWS S3 and Cloudfront - this is what I am going to describe in this post. It's almost free, but requires a LOT of technical expertise which is why I'm posting this. This has a lot of disadvantages - it requires a lot more work to set up, you can only do edits on your local computer, and every time you make edits, it takes manual work beyond just editing. You're also limited in what functionality can be on your site. It's not for the faint of heart. But it only costs a base of $0.50/month, with costs going up a little if you have a lot of traffic. If you're interesting, keep reading...
Static Wordpress Sites with Simply Static
With my coordinatecommons.com site - I put the HTML, CSS, and Javascript in an S3 bucket, and use cloudfront through AWS to host it. That ends up being essentially free because it gets almost no traffic. So I thought, why can't I do this with Wordpress? I don't actually need a live database for my site - it's going to be all static content, no ordering of anything, no forms, etc.
So I found Simply Static - a plugin for Wordpress that will export a static site to a zip file. You can then upload this zip file contents to an S3 bucket, and voila, you get a static Wordpress site! Once you register on the site, you can download the code for the plugin for free, and just add it to your Wordpress site. They do have pay options to automatically export to AWS, GitHub, Cloudflare, and others, but that starts at $99/year (as of July 2025). Again, because I have no idea how much traffic I'll get, or if I'll even keep adding to the site, I don't really want to spend on the site. So I am going to use the free plugin.
Step by step guide for setting up a static Wordpress site
Making your own static Wordpress site for almost free does take some work and is definitely not straightforward. Full disclaimer, I am a software engineer with a lot of experience using AWS. If you don't have much AWS experience and don't understand a lot of the terminology I use here, you probably don't want to go this route. For those who are comfortable with AWS, here's exactly how I set it up.
1. Get Wordpress running locally
To build your site to export, you need to run a Wordpress instance on your local computer. I found this site - https://www.hostinger.com/tutorials/install-wordpress-locally - gives a really good overview of how to do it so I won't go in depth. I'm running Windows, and went the XAMPP route.
- Download and install XAMPP, and uncheck Perl.
- Then when it starts up, start Apache and MySQL.
- Then follow the steps in that page. That page explains so much I won't attempt to re-explain it. But at this point, you should be able to load up http://localhost/yoursitename/wp-admin to log in, with the username and password you set up during the installation.
2. Build your site
So now, build your site! I don't have much advice here - I didn't spend too much effort in to building a nice site. Here are a few things I did try that you may want to consider for making a nice site:
- Install basic Wordpress themes - on the Themes tab you can find a lot of Wordpress themes. These met my needs for a basic blog.
- Elementor - this is a very powerful full site builder plugin, with a free version that does a lot. I was able to install this by downloading the free version, adding it as a plugin from the Plugins tab. But it was a bit overkill for me. Maybe some day I'll come back to this if my blog takes off.
- Breakdance - another full site builder plugin with a free version, like Elementor. I was also able to install this. Similar to Elementor it was definitely overkill for my needs.
3. Install Simply Static
- Download the free Simply Static as a zip file.
- Go to the Plugins section of Wordpress Admin on your local machine
- Upload the Simply Static zip file you just got. Activate it when prompted.
- Go to Simply Static on the left menu bar of the Wordpress admin, and click Export. This will take some time.
- When it finishes, you can click the Download Now button to get the zip file.
4. Set up S3 bucket
- From the AWS console: Go to S3
- Click to Create a bucket.
- Name it the name of your domain name (this isn't really necessary but makes it easier to distinguish it).
- Click the Permissions tab:
6. Then uncheck Block all public access, and click Save.
7. We're not done yet. From the Permissions tab, click Edit by Bucket policy8. You'll need to paste in this block of JSON in to the Policy area, replacing mydomainname.com with your actual bucket name:
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "AddPerm",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::mydomainname.com/*"
}
]
}
9. Then click Save Changes.
10. Now click on the Properties tab.

5. Upload files
Now you can upload everything!
- Unzip the zip file you downloaded from Simply Static to a folder.
- Click to Add Files from your bucket in the AWS console,
- Navigate to the directory you unzipped the zip file to
- Pick index.html.
- For each unzipped folder, click Add Folder, and pick it. Unfortunately I can't figure out a way to upload everything at once.
Once all folders are uploaded, click the Upload button. This will take some time because there will be a lot of files.
6. Test out the site
OK, now you can actually load the site! But... not on your domain name, and not over https. But you should try the site out to make sure it works. Open up the S3 Properties tab for your bucket, and open up the URL that is at the Bucket website endpoint under Static website hosting. Your site should load - click around and make sure everything looks good.
7. Setting up the https certificate
If you've already purchased a domain name - great! You don't need to have purchased it from AWS's Route 53 service. I use Namecheap. AWS does provide free SSL certificates though - you do not need to purchase that from Namecheap. I'll explain how to set up an SSL certificate for your domain name.
- Search AWS Console for Certificate Manager and open that up.
- Click to Request public certificate
- Enter your domain name in, and click Request
- When you do this, it will say that the certificate was successfully requested but further action is needed. Go ahead and click the View certificate button.
- Now, you'll need to perform DNS verification by adding CNAME records from your domain name provider. https://docs.aws.amazon.com/acm/latest/userguide/dns-validation.html explains how to do this from the Amazon side - each domain name provider will be a little different for how ti do it on that end. For Namecheap - go to your dashboard, click Manage on your domain, click Advanced DNS, and click Add New Record under Host Records.
- From the AWS end - scroll to the right under your domain to see the CNAME name and value. Copy the CNAME name and chop off the part that has your domain name - just paste the first part in to the CNAME host value on your domain name provider.
- Then paste the CNAME value from AWS to the Value in your Domain name provider.
- Save the new CNAME on your domain name provider
- After a minute or so, if you reload your certificate details in AWS - the status will show Issued. This means you're good!
8. Cloudfront to serve content
AWS Cloudfront is used to serve up your S3 bucket through your domain name, through HTTPS.
1. Find Cloudfront in the AWS Console, and click Create distribution.
2. Enter a name for Distribution name (I don't think this name matters). You can't enter your domain yet if you didn't use Route 53, so skip this for now.
3. Under Specify origin, click Browse S3, and pick your bucket.
5. Then click Create Distribution.
6. Now you must go back and enter your domain. Under the general tab, click Add domain.7. Type in your domain name and click Next.
8. Your certificate should be here on the next screen and selected, so ensure that's picked and click Next.
9. Now click Add Domain.
10. One more setting - form the General tab, click Edit, and type in index.html as the Default root object.You may also want to pick a lower price class to save a little money.
9. Configure Route 53 to route traffic from the custom domain
We're almost here, this is the last part! Even though you don't need to use AWS Route 53 to purchase the domain name, you need to use it to route traffic to the cloudfront distribution. A way to get around this is to use www as a CNAME entry on your domain name - point this to the cloudfront distribution URL, and then add a URL redirect at your root level to www. But, in my case, I don't want to have to use www, that's an outdated concept. You can instead use Route 53 to manage all routing to allow direct navigation to the root URL (yourdomain.com) instead of having to go to www.yourdomain.com.
NOTE that this is the only part that has a fixed cost - it's $0.50/month. If you really want to get around that, you can use www as the CNAME, but I figure paying 50 cents per month is fine.
I found out how to do this at https://benjamincongdon.me/blog/2017/06/13/How-to-Deploy-a-Secure-Static-Site-to-AWS-with-S3-and-CloudFront/.
Here are the steps with updated screenshots:
1. Find Route 53 in the AWS Console
2. Click Get Started
3. Select Create hosted zones and click Get Started
5. Scroll to the right of the Records list and you'll see 4 items listed in the NS record. Copy these (do NOT just use what's in this screenshot - your name server values may be different!
6. Now go to your domain provider and enter these as the name servers for your domain. I'll give instructions for Namecheap:
7. Click Manage on your domain name
8. Pick Custom DNS under Nameservers
9. Enter each of these 4 entries and click the green check
11. Click Create Record
12. Leave the Record name field blank
13. Leave Record type as A
14. Toggle the Alias slider on
15. Click "Alias to CloudFront distribution" under "Route traffic to"
16. Click "Choose distribution" and pick your distribution
17. Click Create Records
You're done! You should be able to load your site at https://yourdomainname.com after a bit of time. They say it can take 48 hours for DNS changes to propagate - that's a bit long, but it doesn't take effect right away. Give it a few hours to a day.
(Optional) - if you want to also be able to load https://www.yourdomainname.com:
18. Click Create Record
19. Enter www as the Record name
20. Toggle Alias on
21. Pick "Alias to another record in this hosted zone" under "Route traffic to"
22. Click "Choose record" and pick your domain name
23. Click "Create records"
10. (Optional) Email forwarding
I haven't set this up yet. I've read a few posts how you can set up an SES lambda to SNS topic to lambda which will forward to another address like Gmail, but I haven't set this up.Backing up database
It's VERY important that you back up your SQL database frequently. I've had a lot of problems with the database randomly crashing (I'll get more in to that in a bit), and since you're running all of this on your local computer, you'll lose everything if your local database gets messed up.
To back up:
1. Load up phpMyAdmin (click the Admin button from Xampp control panel by Apache, and then click phpMyAdmin at the top)
2. Click on the databae for your site along the left panel
3. Click the Export link along the top menu bar
4. Click the Export button.
5. This will download a .sql file named for your site
6. Copy this file to a cloud backup. I am using my Microsoft OneDrive to do this but any cloud backup will work as long as it's not on your local machine. I recommend making a new backup file every time - don't keep overwriting the file in the cloud - name the file for the date. This way you can go back to specific dates
Editing Your Site
Once you have your initial content up - you'll certainly want to make changes to it - edits, more posts, etc. To do this:
1. Start up MySQL and Apache from the XAMPP Control Panel application on your local machine
2. Open up WP Admin locally by going to http://localhost/yoursitename/wp-admin/
3. Make all of your edits, and save and Publish.
4. Open up SimplyStatic on the left panel of WP Admin
5. Click Export.
6. Click to download the zip file.
7. Follow the steps in "Upload files" above.
8. Open up AWS Console
9. Go to Cloudfront
10. Click on your distribution
11. Click the Invalidations tab.
12. Click Create Invalidation
13. Enter /* as the path
14. Click Create. Now it will run and invalidate caches - this will clear out all cached copies of your content at all of the distributed versions. So now when you load your site - you should see the new version.
Troubleshooting
A frequent problem that happens to me that MySQL just won't start. I click to start it in the Xampp control panel, and it will start and then quickly stop with the message "Error: MySQL shutdown unexpectedly. This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by another method.". Sometimes, clicking the Logs will show an error, but usually, there is no error in the error log.
Every time, I am able to fix it by following these steps:
1. Go to C:\xampp\mysql in Windows Explorer
2. Rename the data folder to data_old
3. Make a copy of the backup folder, and rename it to data
4. Copy the data_old\yourdatabase folder in to the data folder
5. Copy the file data_old\ibdata1 in to the data folder
6. Start MySQL. It should start now.
This frequent error is why making sure you have a backup in the cloud is so important. One of these times, I'm sure that doing these steps won't fix it. If that happens - I would have to re-install MySQL and import the backup file to get my data back.
Recommended Additional Plugins
I recommend using these additional plugins with your site:
- Converter for Media - this is a free plugin that will optimize all of your images - specifically by compressing further and using the WebP format. Optimizing will really help the site performance for visitors - they'll see images faster - and it will really help your search engine rankings. Converter for Media in particular is great because it will do WebP for free with no limits! You can upgrade to a paid version for AVIF support - which compresses more than WebP, but I don't think that's necessary, and I also think AVIF files don't look as good as WebP. Unlike other free plugins, you can do a bulk optimization of images that you already have.
Google Analytics
You probably want to track visitors to your site. Google Analytics is a great, free way to do this, that has been the industry standard for a long time. I'm not going to write up a full explanation of how to do this, because the site How to Install Google Analytics in WordPress for Beginners does a fantastic job at this. Use option 2 - to embed the code in to your header with WP Code.
No comments:
Post a Comment