Quick Maintenance Mode on Your WordPress Blog

If you want to do some maintenance on your WordPress blog, and you want to let your visitors know that your blog is down for maintenance, then you have 2 methods to do that.

The first method is that you can adds a splash page to your blog that lets visitors know your blog is down for maintenance by using Maintenance Mode WordPress plugin, this method is easy for WordPress beginner.

Another method is quite simply for advance WordPress users, just copy and paste the following code to functions.php will do. Don’t forget to remove the code once you are done with maintenance.

function wpr_maintenance_mode() {
    if ( !current_user_can( 'edit_themes' ) || !is_user_logged_in() ) {
        wp_die('Maintenance, please come back soon.');
    }
}
add_action('get_header', 'wpr_maintenance_mode');

2 Responses to “Quick Maintenance Mode on Your WordPress Blog”

  1. [...] View the original article here Share and Enjoy: [...]

  2. Liza Sallings says:

    I have spent a number of weeks searching round on the easiest way to get ranking on Search engines. Since I m not an IT technician this required me quite some energy. I actualy came accross a very few articles that help me to figure out Seo but what I definitely wanted is mentorship. I invested some time on forums posting and eventually I found folks capable to guide me personally. At this point my web site is standing in the top ten for the majority of of my keywords however the quest is not really full yet, I still have a difficult time generating a living out of all of them. Hopefuly I will be capable to in the next few weeks . Anyway thank you for the post that was incredibly helpful .

Leave a Reply