Servers & requirements

What your WordPress and your host need for MyStaticWP, and what changes on Apache, LiteSpeed and Nginx.

What your site and your host need

MyStaticWP asks very little of a host. It needs a recent WordPress and PHP, pretty permalinks, a folder it can write to, and the ability for your site to request its own pages. Three of these are checked for you and block the plugin if they are missing. Everything else only changes how fast static pages are served.

The one thing that varies from host to host is the direct shortcut: on Apache and LiteSpeed, the web server can hand out the static file before WordPress starts. On other servers, the plugin serves the same file through PHP. The result is the same page; the speed is not.

  • No special server module is required.
  • Nothing is installed outside your site’s folders, apart from one small file in wp-content/mu-plugins for per-page plugin choices.
  • Visitors never contact any outside service because of the plugin.
On this page

Minimum requirements

Requirement Detail If it is missing
WordPress Version 6.0 or higher. The plugin is built for that version and above.
PHP Version 7.4 or higher. Blocked. The plugin says “PHP version is below the minimum required”.
Permalinks Any structure except Plain. Blocked. The plugin asks you to choose a pretty structure in Settings → Permalinks.
Uploads folder Writable by WordPress. Blocked. The static pages of the Hybrid style could not be written.
Loopback Your site can request its own addresses. Pages cannot be captured. The journal shows “The page could not be captured”.

The checks the plugin runs

The Overview lists the environment under Your site. Only three items can block the plugin. The others are for your information.

Check What it does
PHP version Blocks the plugin if it is below 7.4.
Uploads writable Blocks the plugin if the uploads folder cannot be written to.
Pretty permalinks Blocks the plugin with Plain permalinks. With them, every address carries a query string, and nothing would become static except the home page.
WordPress version Shown for information.
Database version Shown for information.
Memory limit Shown for information. The plugin sets no minimum of its own.
Server software Shown for information. It decides whether the direct shortcut can be used.

The first step of the Getting started checklist is ticked when none of the three blocking items applies.

Your site must be able to request itself

To make a static copy of a page, MyStaticWP asks your own site for the dynamic page, as an anonymous visitor would, and stores the answer. That request goes from your server to your server, and it needs to work. A few setups break it:

  • a site protected by a password at the server level (a staging site with HTTP authentication);
  • a firewall or a host rule that refuses requests from the server to its own address;
  • a maintenance-mode or coming-soon plugin that answers every anonymous request;
  • a domain name that the server itself cannot resolve.

When it fails, the journal lists the page as failed, with the reason and the HTTP code. The previous static copy, if there was one, stays in place.

Web servers

Server How static pages are served
Apache Directly by the web server, before WordPress starts, through a marked block added to .htaccess.
LiteSpeed The same as Apache. LiteSpeed reads .htaccess rules.
Nginx Through PHP. The direct shortcut is not available. The page is still static, and still not rebuilt for each visit.
Unknown Through PHP. If the server does not say what it is, the plugin does not try the shortcut.
Behind a proxy What counts is the server that runs WordPress. A proxy or a CDN in front of it does not change that.

The server is recognised from what it reports about itself. PHP-FPM behind Apache is treated as Apache.

How the direct shortcut works

The plugin adds a block to the .htaccess file in your site’s root, between two marker lines. The block answers with the static file only when all of the following are true:

  • the request is a plain page view (a GET);
  • the address has no query string;
  • the visitor does not carry a WordPress login cookie;
  • a static file exists for that address, in either of the two folders.

Otherwise the request goes to WordPress as usual. On a multilingual site, the bare address of the site is excluded, so your multilingual plugin can redirect visitors to their language.

The block exists only while static mode is on. Turning static mode off, or deactivating the plugin, removes it. If you deactivate and reactivate the plugin while static mode is on, the block comes back by itself the next time you open any screen of your administration.

If .htaccess cannot be written, the Switch screen says Server-level bypass not active — .htaccess could not be written. Check that it exists and is writable, then save this form again. Static pages are then served through PHP.

Folders and permissions

Folder Used for
wp-content/uploads/mystaticwp The static pages of the Hybrid style. Created by the plugin.
wp-content/mystaticwp-strict The static pages of the Strict style. Created by the plugin, outside your media library.
wp-content/mu-plugins One file, mystaticwp-plugin-presence.php, for per-page plugin choices. Only needed if you use the Plugins screen.
.htaccess The marked block of the direct shortcut. Only on Apache and LiteSpeed.

WordPress must be able to write in these places. Nothing is written outside your site.

Managed hosts and staging sites

  • A host with its own page cache. Run one page cache at a time. If your host caches pages in front of WordPress, test your pages after you turn static mode on, and purge that cache when you change something.
  • A staging site with a password. Server-level passwords stop the plugin from capturing pages. Use a staging site without that protection, or allow requests from the server itself.
  • A host that limits requests to itself. Rebuilding captures each page with one request. On a strict host, a large rebuild can take longer.
  • A read-only file system. If wp-content is not writable, the Strict style and per-page plugin choices are unavailable.

Scheduled tasks

The plugin uses three scheduled tasks: the daily rebuild, the steps of a rebuild that is split into batches, and the delayed rebuild after a shared change. They run on WordPress’s scheduled-task system.

WordPress only runs its scheduled tasks when a request reaches it. On a site where visitors are served static files, few requests reach WordPress. On a large or quiet site, ask your host to call wp-cron.php every few minutes, with a real scheduled task on the server. Rebuilds then finish in the background without you keeping a screen open.

Disk space and time

  • Each page is one HTML file. A site of a few dozen pages takes a few megabytes at most.
  • The two styles use two folders. A page is made static in the folder of its own style.
  • A test site with 41 pages was rebuilt in between about half a minute and a little over a minute, depending on the server’s load.
  • A larger site is rebuilt in batches, each within a time budget of about half your host’s time limit.

CDNs and browser caching

When a static page is served through PHP, it carries a public cache header of 300 seconds, so a browser or a CDN can keep it for five minutes. When the web server serves the file directly, its own standard headers apply.

A developer can change the 300 seconds with the mystaticwp_static_max_age filter. If a CDN caches your pages, purge it after a large rebuild if you need visitors to see the change at once.

What leaves your server

  • For your visitors: nothing. Static pages are served by your own server, and the plugin loads no outside script.
  • For you: the license check, in the administration only. It sends the license key, your site address and the product name to the licensing server, and nothing about your visitors.

Check your server

  1. Open MyStaticWP → Overview. Under Your site, check the server environment. The first step of the checklist should be ticked.
  2. Turn static mode on and click Regenerate all on the Switch screen.
  3. Read the status line under the generation style.
  4. Open the journal. Every page should be regenerated or skipped, with none failed.
  5. Open a page in a private window and reload it with the browser’s Network tab open.

If something looks wrong

  • The environment is blocked. The Overview names the item: PHP version, uploads folder or permalinks.
  • Every page fails to capture. Check that your site can request itself: server password, firewall, maintenance plugin, name resolution.
  • The status line says the direct shortcut is not available. The server is Nginx or unknown. Static pages are still served, through PHP.
  • The status line says .htaccess could not be written. Make the file exist and be writable, then save the Switch form.
  • Background rebuilds do not finish. Ask your host to call wp-cron.php every few minutes, or keep the Switch screen open.

More help is on the Troubleshooting page. What the plugin can and cannot do is in Compatibility & limits.