How to Set Up a Headless WordPress Website | HostAdvice

How to Set Up a Headless WordPress Website

Headless WordPress sites are all about separating the back and front ends of your website. This approach can be used to generate static copies of your site. In a headless WordPress site, you will not be using WordPress to generate the front end of your site, unlike the traditional model. This results in two significant advantages- faster loading times and increased security.

How to Set Up a Headless WordPress Website (Using AWS)

You could host your headless WordPress site on any provider that you want. However, in this tutorial, we will be creating one with the help of

. When it comes to hosting static websites, AWS allows you to set it up in the most simple and convenient way. Follow the three simple steps mentioned below and set up your headless WordPress site within a few clicks.

Step 1:
Create or Log in to your AWS account

Setting up a headless WordPress site using AWS includes a little more tedious legwork than the traditional way. However, it compensates you handsomely for that hassle in terms of cost-effectiveness. It may cost you as little as $0.50 a month. Adding on that, we’ll be using the Amazon S3 tier for hosting, which offers 12 months of hosting for free.

How to Set Up a Headless WordPress Website - Arvind

You can easily sign up for your account by clicking on Get started with Amazon S3 option and filling out the registration form. If you are already logged into your Amazon account, you will find the Complete Sign Up button instead. However, the process remains the same.

Step 2:
Create a static copy of your website

As we discussed earlier, WordPress acts as the backend in a headless setup. So, you will need to install WordPress somewhere so that it can act as the back end of your site. Additionally, it will also generate static content for your frontend. A local installation is followed in the tutorial so that you can avoid paying for two different hosting providers.

There are various ways of installing a local WordPress website:

  • Using tools like XAMPP to create a full local WordPress environment
  • Using software like Local by Flywheel specifically designed for local WordPress installations

Naturally, the latter offers a more user-friendly approach for setting up a local WordPress website. Download and install the Local by Flywheel software and set up a new local website.

After configuring and customizing your local website, update your settings, choose a theme, and create pages and posts. Once you’re all done with the content and theme of the website, you’ll be ready to create a static front end for it.

To achieve that, we will set up the WP2Static plugin. You can also use some other plugins for this as well. But, WP2Static works smoothly with multiple platforms including AWS, Netlify, GitHub Pages, and more.

Once you set up the plugin, you will find it in your dashboard. When you access it, it directly takes you to the Deploy static website tab.

How to Set Up a Headless WordPress Website - Arvind

In the Destination URL field, enter the URL that the visitors will use to access your website. Note that this will depend on your Amazon S3 configuration. Finally, select Amazon S3 in the dropdown menu where you have to select the host for the static version.

In the next step, before deployment, we will be configuring the settings and connecting

to the website

Step 3:
Auto-deployment of static pages to AWS

Once you select Amazon S3 for hosting, multiple options will appear:

How to Set Up a Headless WordPress Website - Arvind

You first need to enter both your access key ID and secret access key before you can begin deployment. Note that the access key ID must have the correct permission levels for the deployment to be successful.

Having entered both the keys in their respective fields, you now need to select the region your AWS bucket was created in and enter its name as it appears in your AWS console:

Lastly, go to the bottom of the page and hit the Start static site export button. This step typically takes a while if your website is large. Once the process is finished, you will be able to access the live static version of your website. In other words, you have successfully set up a headless WordPress website.


And voila! You should have successfully set up your headless WordPress website by following these three simple steps. Remember that the Headless model is not the way to go for every website. However, if your website doesn’t have a lot of dynamic elements, its security and performance will increase by having a static frontend.

How To Set up a VSFTPD Server on a CentOS 7 VPS or Dedicated Server

Brief Description FTP is usually insecure exposing clear-text passwords, userna
2 min read
Avi Ilinsky
Avi Ilinsky
Hosting Expert

How To Set up a VSFTPD Server on an Ubuntu 16.04 VPS or Dedicated Server

Brief Description FTP data is usually insecure since information (usernames, pa
2 min read
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How to use phpMyAdmin to develop a website (without MySQL experience)

Brief description A web developer who is not well versed into coding websites f
2 min read
Idan Cohen
Idan Cohen
Marketing Expert

How to Install MySQL on a Windows Web Server Running Apache

This tutorial will show you how to install the MySQL database on a Windows serve
3 min read
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top