Turn your WordPress site into a super-fast static site and host it in the cloud for free!

Turn WordPress into a static site generator and host securely like Jamstack in a top cloud provider for free or at a very affordable cost.

Step 1: Install WordPress locally using your favorite method. I like localwp. I recommend keeping local files and databases in Git or iCloud/gdrive since we will not deploy database and WordPress source code. Alternatively, you can host WordPress in a cheap hosting for control-panel use only.

Step 2: Create static files of your WordPress site using a WordPress plugin called “Simply Static”. Install the plugin Simply Static and generate html static files.

Step 3: Now since I’m using localwp I need to replace local URLs with production URLs, and replace http with https.
create a Makefile to help you replace URLs with the content below

update LOCAL_URL and PRODUCTION_URL with your site URLs.

run make replace_http_with_https and make replace_host.

Step 4: Host static files on the cloud. Cloud options are

Upload static files directly or connect the Github private repo to deploy automatically. I’m using Cloudflare Pages, which comes with all the goodness of Cloudflare security.

Step 5: Point your domain name to the cloud by updating DNS records in the domain control panel and that’s it! you have a high-performance and secure WordPress.


Posted

in

,

by

Tags: