The best way to do that is to install WordPress in a directory that is not available to the public. You can then rewrite all requests to the private directory using htaccess or a custom NginX config. Use a CDN for static files, otherwise scripts and styles won’t work because your installation is in a private directory.
Ah, that sounds really complicated. Is there an easier way to set this up? I wouldn’t even know where to begin with that unless there were plugins to do it.
WordPress is actually not built to hide itself.
Install our plugin and set Page Cache mode to Disk: Enhanced
in Performance => General Settings. That mode actually works like serve static pages directly to the main url folder
, but instead of having the files in the main url folder, the pages are saved in the wp-content/cache/
directory of your WordPress installation. Our plugin will configure your Apache/NginX to serve the files directly instead of running the installation to build the page.
Okay, so I would set it to put the pages in the cache folder?
That’s the default behaviour. You don’t have to do anything but check the settings if Page Cache mode is set to Disk: Enhanced
.
Thank you for being patient with me, but I can’t seem to see Page Cache as an option in the plugin settings or the wordpress settings.
In your WP Admin, there should be an item in the menu called Performance. When you hover over it, a submenu should appear next to it. When you clicked it, the submenu opens underneath that item.
One of the submenu items is General Settings, click that one. On that page, you have a lot of blocks, first one is “General”, second one is “Page Cache”. On the Page Cache block there is an option Page Cache:
which should be enabled, if not then enable it. There also is an option Page Cache Method:
where you should select Disk: Enhanced
.
After changing the settings, click Save Settings & Purge Caches. If you have any trouble, I advice you to click the submenu item Support and choose “Plugin Configuration”. Fill in the rest of the form and we’ll help you set up your plugin as soon as possible.
I’ve never seen a menu called Performance, and I can’t find it now that I’m looking. Is it installed by the plugin? It’s not in the man menu, or settings, or tools, or anywhere else I looked…
It is a menu item added by the plugin that is supposed to be somewhere underneath settings, but not in the settings submenu. You should be able to see an item called Performance in the admin bar too. If you don’t see that, you didn’t install our plugin, or you didn’t activate it.
Well I have the WP Static Site generator… but no Performance. And I’m pretty sure it’s activated. It’s just not running yet. This is really weird.
If you see something similar to this: https://ps.w.org/static-html-output-plugin/assets/screenshot-1.jpg?rev=1905857
Then Performance should be located in the left sidebar in the bottom where Freemius Debug is located in the screenshot.
…I don’t see any of that. But I do have an icon at the top under the dashboard that says ‘WP Static Site Generator’. It’s beginning to feel like I installed the wrong plugin…
Ah, it was the wrong plugin. I do not know how I did that… I’m sorry for wasting your time, but I did use your advice anyway,
But, anyway, I installed it properly this time, lol. But I got a few 500 errors from the main page for a little bit before I cleared the cache. Is that normal?
-
This reply was modified 6 years, 1 month ago by hadashi.
Oh crap! It’s stopping some images from loading? How do I fix that?
It’s also putting my main page in a loading loop when I’m logged on. I suspect this may be options I’ve selected…
-
This reply was modified 6 years, 1 month ago by hadashi.
I suggest you go to Performance => Support and request plugin configuration. Then we can ask for login details and help you set up the plugin for your environment.