The Maintenance mode in WordPress te posibilita trabajar en tu Web con la puerta cerrada. Aprende a activar el maintenance mode in this CourseWpress tutorial.
What is maintenance mode in WordPress and what is it for?
One of the reasons why WordPress is the best content manager web is because it allows you to apply different configurations according to your needs.
Most of these configurations and modifications they can be done simply and in front of the public. Or that is, without having to "close" the web.
Así, puedes publicar contents, actualizar plugins, modificar ciertos aspectos de tu template or theme. But from time to time you need to make bigger changes that require limit access of visitors while you work.
That's when maintenance mode kicks in.
The maintenance mode in WordPress is a poster that appears on your website and that alerts your visitors that:
- The web is under maintenance.
- That this site is in construction, with a text like the typical coming soon.
At the same time it allows you, if you configure it, to place:
- Countdown to notify when the site will be ready.
- Capture emails of your visitors.
- Links to your social networks.
We find it extremely useful when we work on new websites from clients who know the domain. These clients enter your page all the time and, as they can see the modifications in real time, when it comes to delivering them there is no surprise.
That is why for us discovering the maintenance mode in WordPress has been of great help. This has allowed us to keep the surprise factor.
How to activate maintenance mode in WordPress?
There are several ways to activate maintenance mode. In this tutorial we will explain two:
- Activate maintenance mode in WordPress without plugins
- Put the maintenance mode with plugins.
How to activate maintenance mode in WordPress without plugins
To activate the maintenance mode on our WordPress-based website without the need for plugins we need to modify the file functions.php of our theme.
Yes, we will manipulate the code of our website but if you follow the steps as we indicate it will be easy for you.
Warning:
Modify the code of your website can be risky. So before modifying the code, back up everything.
- At desk of your WordPress website follow the following path:
Appearance> Editor.
- Now locate the file functions.PHP or PHP (Theme Functions).
- Before modifying something, create a back. We support copying all the code of the section PHP and saving it to a file NotePad ++ (free and free) or from any code editor.
- Now copy this code and paste it at the end of the section PHP:
// Activate WordPress Maintenance Mode
function wp_maintenance_mode () {
if (! current_user_can ('edit_themes') ||! is_user_logged_in ()) {
wp_die(‘<h1 style=»color:red»>Página Web en Mantenimiento</h1><br />Estamos en mantenimiento, Volveremos pronto!’);
}
}
add_action ('get_header', 'wp_maintenance_mode');
- Save the changes and that's it. Now every time someone enters your website they will see a sign like this:
- You can modify the code to your liking and customize the message. With a few simple touches you can customize the design to your liking.
Put the maintenance mode with plugins in WordPress
The other way to activate maintenance mode on your WordPress website is through plugins. There are hundreds of options in the WordPress repository. You just have to write phrases like:
- Maintenance mode.
- Under construction.
- Coming are.
You will come across many plugins:
We have tried almost all of them.
In this opportunity we will explain how to put your website in maintenance mode with WP Maintenance Mode of the people of Designmodo.
Activating WP Maintenance Mode
WP Maintenance Mode is available in the WordPress repository and has over 600,000 active installs.
To start it up, the first thing to do is install and activate it following the usual procedure.
- At desk of your WordPress website follow the following path:
Settings > WP Maintenance Mode> Settings
- The first thing is to activate the maintenance mode in the tab:
General> Reputation
- Save the changes.
- Now if someone wants to enter your website they will find a sign that says it is in maintenance mode:
Sorry for the inconvenience. Our website is currently undergoing scheduled maintenance ”.
- By default the poster is in English but you can modify it as you want in the Design tab.
- In the modules tab: you can add a countdown, your social networks and even place a link to make a redirect.
- If the options that the module section offers you seem insufficient, you can activate a Bot. That in future deliveries we will teach you to configure in detail.
- Once modify the message, enter your social networks and set the countdown clock. Save the changes. Now your visitors will come across something like this:
Now you know two ways to activate the maintenance mode on your website. Of course there is much more to learn, if you want to know more sign up for the best online WordPress course in Spanish.