How To Set Up a Static HTML Website on WP Engine
You may have a use case where you have an existing WP Engine account and you want to add a micro site with plain html files. For cases like this where no dynamic functionality is needed and pages will rarely update, a static html site might be a good option for you.
WP Engine software is built for hosting WordPress® sites.1 Because of this, some of our features will not work for static html sites, and our Support agents will not be able to troubleshoot website issues with static html sites. See the Unsupported Features section below for examples of tasks that your development team may need to handle for this type of site.
Add a Home Page
- Create a new website in the User Portal.
- Using one of our code deployment methods like SFTP, SSH, or Git, create an index.html file in the root directory of the website. This will be the html for your home page.
Add Additional Pages
- To add an additional page, create a folder in the root directory of your site with the name of the page.
- Example #1: If you want the url to be
example.com/about
then make the folder name “about”. - Example #2: If you want the url to be
example.com/about/our-team
then make a folder named “about”, and then make another folder inside of the “about” folder named “our-team”.
- Example #1: If you want the url to be
- Add an index.html file inside of each folder to display the content for that page.
- For the examples given above, the html of the about page would be located at
/about/index.html
, and the html for the our-team page would be located at/about/our-team/index.html
.
- For the examples given above, the html of the about page would be located at
Link To Pages
- In your html you can add links to each folder path which will show the page contents of the index.html file for each folder.
- For the above examples, the link to the about page would be
https://example.com/about
and the link to the team page would behttps://example.com/about/our-team
.
- For the above examples, the link to the about page would be
Edge Full Page Cache
Turning on Edge Full Page Cache will allow your html files to be loaded from the Cloudflare CDN Network which will serve them from the network server closest to each visitor. This will reduce the load time of each page improving the overall experience for your visitors.
Unsupported Features
Some examples of WP Engine features that are not supported for static html (non-WordPress) sites:
- Automatic Cache Clearing – Cache is automatically cleared when updates are made via WordPress. Cache will need to be manually cleared through the User Portal after updating html files.
- Automated Search/Replace – WP Engine does an automated search/replace when the Primary domain is changed for a site in the User Portal. WordPress sites often use the site url from the database for all of the links on a site. Since static html files will not use this database value, relative links are suggested in place of absolute links so that you don’t have to update links when your domain changes.
- Relative link example: A relative link would use a url of
/about/our-team
instead ofhttps://example.com/about/our-team
.
- Relative link example: A relative link would use a url of
- WP-CLI – Any updates that are programmatically or manually made to a site via the WordPress WP-CLI will not be applied to static html files.