Last year, I converted my WordPress dynamic website to a completely static website. Well, almost completely static. Until a few days ago, that is. I was using PHP to process the contact form on my contact page. For the last eight months, it was the only dynamic property of anything on this website – and now it isn’t.
This is the first in a series of articles where I’ll show you how to do the same thing with your website, whether it’s an existing website or not. But first, I have to explain why you should even consider it.
A dynamic website can be awesome but that awesomeness comes with a cost. You need a database engine and a scripting engine running. With WordPress, it’s PHP and MySQL.
Your content management system is online and you have to log into it to do anything with the back-end, the admin area. You have to worry about security along with everything else.
With a static website, hacking in from the outside will serve no purpose for a would-be hacker. Your website files can’t run scripts or connect to databases. They’re only good for display purposes.
You only have to worry about someone hacking in from the inside and that isn’t going to happen if you use something other than shared hosting. Look, you can run a static website like mine on a five-dollar a month droplet (same as a VPS) at Digital Ocean. It’s a lot better than shared hosting and a heck of a lot more secure from the start.
Once you set up a static site generator (any type), you’ll be creating plain HTML files. A locally hosted WordPress site can be used in this way. You could probably do it from another domain or subdomain on the server, but that kind of defeats the purpose. You don’t want a scripting or database engine running on the server at all.
Running a locally hosted WordPress site is almost the same as running one online. There are certain things that won’t work, of course. Like certain parts of the “Jetpack by WordPress.com” plugin. It’s best to avoid anything that has to communicate without outside sources (except for CDNs).
If I was still doing this online, I would have to wait until power is restored to do anything at all. No power, no Internet.
The most important reason for doing things this way is the most simple reason: Peace of mind.
You can publish an article (or post or whatever you want to call it) and then ignore your website for days. If someone comments on an article, you’ll receive a notification by e-mail.
With a dynamic website, you’re asking for trouble if you ignore it for days. I won’t even get into the details why ignoring it would be a bad idea.
This is a list of all the articles in this series. You should read each article in the order they’re presented. You could miss something important if you skip around.
Previous and Next Articles (if any):