Close a wordpress blog – keep site as it is but prevent hacks

Last summer I created a travelling-blog on my webspace to document my journey. Now the journey is over and I won’t put any new posts in this blog. I also don’t whish to have any new comments.

How can I close the blog (to make in invulnerable to external hacks, even if I don’t install any new upgrades) but keep all posts, comments, pictures, etc. as they are?

What I found is

  • https://github.com/megumiteam/staticpress (however, although the resulting static page contains all the blogged content, the design is really messed up.)
  • https://github.com/aral/wordpress-migration-tools (I couldn’t try this one, because it is written in python and I don’t know any python.)

Is one of them recommendable?

Is there another way to prevent all interactions with the page, so there’s no need to take care about wordpress (or plugin) updates, while still keeping the site secure?

1
1

Why not just disable comments and registration?

This comes to mind also:

(Redirect all requests to login page or admin pages to homepage. A little irreversible.)

$currentURL = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
    if (strpos($currentURL, 'wp-admin' ) or  strpos($currentURL, 'wp-login' )) {
                    header( 'Location: '.site_url() );
}

Caution: this stops you from logging in also.

Edit:

And adaptation of the above code put into plugin format can be found here. Thanks to brasofilo.

Modified code:

add_action( 'init', function()
{
    $currentURL = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
    if( strpos( $currentURL, 'wp-admin' ) or strpos( $currentURL, 'wp-login' ) )
        exit( wp_redirect( site_url() ) );
} );

Leave a Comment