Skip to content

Deploy a WordPress site

View as Markdown

Publish a WordPress site on your own domain as a static site. You keep writing in WordPress as you do today; visitors get a static copy of every page, image and file, served by Evolving Edge.

In short:

  1. Keep WordPress on an address of its own, for editing.
  2. Set permalinks to Post name.
  3. Export the site with the free Simply Static plugin.
  4. Claim your domain.
  5. Deploy the export. Repeat steps 3 and 5 whenever you publish a change.
Export tool Simply Static (free WordPress plugin)
Output folder The folder Simply Static writes, or its ZIP archive unpacked
Settings you need Pretty permalinks, and absolute URLs set to your domain
Routing Trailing slash (/about → /about/)

You need:

  • A WordPress site you can install plugins on.
  • An Evolving Edge account that can deploy workloads. See Getting Started.
  • A project in the portal, and its project ID (it starts with proj_).
  • A deploy token from the portal, under Workload → Deploy Tokens, with workload:write. Scope it to the project. See Deploy tokens.
  • The domain you want to serve the site on, for example www.example.com, and access to its DNS settings.
  • Node.js 22.12 or later, on Windows (x64), macOS, or Linux (x64 or arm64), to deploy from the command line. To deploy from the portal instead, you don’t need Node.js.

Your public domain will point at Evolving Edge, so WordPress needs another address to keep running on, for example edit.example.com, or a copy on your own computer with a tool such as Local. Only you and your editors use it. Visitors never see it.

If WordPress already runs on www.example.com, move it first: change WordPress Address and Site Address under Settings → General to the new address, and point that address at your current host.

Under Settings → Permalinks, choose Post name (/%postname%/), or any structure that ends in a slash. Each page is then exported as a folder (about/index.html), served at /about/.

The Plain structure (/?p=123) can’t be exported: a static site has one file per address, and query strings don’t pick a file.

Install and activate Simply Static from Plugins → Add New. Then, under Simply Static → Settings:

  • General → Replacing URLs: choose Absolute URLs and enter https://www.example.com. Every link to your WordPress address is rewritten to your public domain.
  • Deploy → Deployment Method: choose ZIP Archive to download the export, or Local Directory if you’ll deploy from the machine WordPress runs on.

Then open Simply Static → Generate and generate the static files. Download the ZIP when it’s done and unpack it, for example to a folder named site.

Simply Static finds files by following links from your pages. Media you upload but never link to isn’t exported. To include a file anyway, add its address under Include → Additional URLs.

Only the project that claimed a domain can deploy to it, so claim it before your first deploy. In the portal, or from the command line:

Terminal window
export EE_CDN_TOKEN=<your deploy token>
npx -p @evolving-edge/ee-cdn-cli ee-domain claim www.example.com --project proj_abc123 --wait

It prints a TXT record and a CNAME record to add at your DNS provider, then waits until the domain is active. See Custom domains for the portal steps, root domains and Cloudflare.

From your computer, deploy the unpacked folder:

Terminal window
npx @evolving-edge/ee-cdn-cli site --domain www.example.com --project proj_abc123 --trailing-slash --images webp
  • --trailing-slash makes /about redirect to /about/, where the page was exported. WordPress’s own links already end in a slash; this catches links typed or copied without one.
  • --images webp is optional. It converts your JPEG and PNG images to WebP while the site is packaged, and rewrites every page that names them, which usually makes a WordPress media library much smaller. Your WordPress site is unchanged. See Images.
  • Each deploy replaces the whole site on that domain. Allow up to about 90 seconds for a new deploy to reach every node.

From the portal: first add a file named _redirects to the root of the unpacked folder, holding the line # ee:trailing-slash on (it does what --trailing-slash does). Then create a workload and upload the folder. See Workloads.

After each change you publish in WordPress, generate the export again and deploy it again. A change in WordPress doesn’t reach your public site until you do.

Redirects. Redirects you manage with a WordPress plugin aren’t exported, because they run in PHP. Write them in a _redirects file instead, and copy it into the root of the export before each deploy:

site/_redirects
/old-post/ /new-post/ 301
/category/news/* /news/:splat 301

The Redirection plugin can export its rules (under Tools → Redirection → Import/Export) as a CSV file, which you can turn into _redirects lines. Large lists of exact rules, as a WordPress site usually has, are fine.

404 page. If the export includes a 404.html at its root, Evolving Edge serves it, with a 404 status, for any address that doesn’t exist. Turn on Simply Static’s 404 page option if your version has one, or save your theme’s 404 page as 404.html in the export. See Custom 404 pages.

Media size. A deploy’s package can be up to 1 GiB, after compression. Photos and video take up most of a WordPress site. ee-deploy reports the package size; if it’s too big, convert images with --images webp, and scale down very wide images (see Scaling down wide images). For video, see Video files.

A static site has no PHP and no database behind it, so anything that runs on each request stops working:

  • Native Wordpress Comments. Turn them off, or use a hosted comment service that loads in the browser, such as Disqus.
  • Native Wordpress Search. WordPress search (/?s=) needs the database. Use a search that runs in the browser, such as Pagefind, or a hosted search service.
  • Native Wordpress Contact and other forms. Point them at a hosted form service.
  • Logins, memberships and shopping carts. These need WordPress running. Keep them on a site WordPress serves.
  • Scheduled posts. A post scheduled in WordPress reaches your public site only at your next export and deploy.
  • Subfolder sites. A site owns its whole domain; it can’t be served from a path such as example.com/blog/ alongside another site.
What you see Why What to do
Links on the public site go to your WordPress address Simply Static wasn’t set to replace URLs Set Replacing URLs to Absolute URLs with your domain, and export again
/about is a 404 but /about/ works The trailing-slash redirect isn’t on Deploy with --trailing-slash, or add # ee:trailing-slash on to _redirects
Every page but the home page is a 404 Permalinks are set to Plain Set them to Post name, and export again
An image or PDF is missing Nothing links to it, so it wasn’t exported Add its address under Include → Additional URLs
A change you published isn’t on the site The site wasn’t exported and deployed after the change Generate the export and deploy it again
The deploy is refused for your domain The domain isn’t claimed for this project Claim it first
The package is over the size limit Media is larger than 1 GiB after compression See Media size

More in the command line troubleshooting.