Added 31.08.2015: Instructions about using Jekyll for converting Wordpress sites to fully static HTML.
Httrack is a tool made for downloading any site into local copy for offline viewing/mirroring. Even better, it keeps the original site's relative link-structure, so all your links keep working as they are.
Depending on your setup, you can run the Wordpress on your local computer and then upload the scraped site to the hosting server. Or, you can setup a subdomain for the WP installation on the host machine and copy the scraped HTML to correct place.
Example command for httrack mirroring:
In this example, mirror of the site is put into "example.com" directory. You might want to search and replace any remaining old links, and tweak things like feeds etc.
This workflow has other benefits besides relieving you from worrying about Wordpress attacks. You don't have to modify live site, which is a very bad practise. You can more easily use proper development tools, like:
- Source control to version your site and keep modifications history.
- Deployment tools allow controlled site updates and rollbacks in case something goes wrong.
...or you can use Jekyll to achieve the same thing
The process described above is quite simple, but may require considerable amount of work, before all aspects of the site are working. I discovered a static site generator called Jekyll, which can also import your existing blog from various sources, including Wordpress.
Using the Jekyll importer required a bit of work by installing necessary Ruby gems, but in the end it was quite a painless process. The importer reads your database, and creates markdown formatted files containing individual blog posts.
After importing is done, you need to create your site layout template(s) by hand. Drafting new blog posts is easy, add new markdown file to _drafts folder, and run jekyll with When you're satisfied with the draft, build the site with and copy the contents of the _site folder to your server.