How to Put WordPress in Maintenance Mode
How to Put WordPress in Maintenance Mode
Ever go to a website and see a page that warns you the page is under construction? You can do that too, as long as you have a business account on WordPress.com or a personal account with WordPress.org. This wikiHow will show you how to put your WordPress website into maintenance mode with either a plugin or by editing the code of your site, which takes a little bit of know-how.
Steps

Using WP Maintenance Mode

Go to your WordPress site dashboard. You can type directly into the address bar “yoursite name.wordpress.com/wp-admin” or “yoursite name.wordpress.org/wp-admin” to get to the dashboard.

Click Plugins. You’ll see this in the menu to the left.

Click the search icon Android 7 Search. You’ll find this to the right of the tabs for Engagement, Security, Appearance, and Writing.

Type “WP Maintenance Mode”. You don’t need to press the “Enter” or “Return” keys after you type in your search.

Click the first search result. The author of the plugin is “Designmodo”.

Click Install. This may take a few moments to complete.

Click Settings. You’ll find this in the left menu, near the bottom.

Click WP Maintenance Mode. You’ll see this near the bottom of the menu.

Click to activate WP Maintenance Mode. This is the first option on the page. You can also change who can alter Maintenance Mode, as well as the appearance of the maintenance message.

Click Save settings. Your website will now start displaying a splash page warning your visitors about maintenance.

Altering Code

Go to your WordPress site dashboard. You can type directly into the address bar “yoursite name.wordpress.org/wp-admin” to get to the dashboard. This method only works if you have a wordpress.org site. It is highly recommended that before you edit any code you should make a backup.

Click Appearance. A menu should drop down from that.

Click Theme Editor. If you don’t see this, your theme’s creator might have disabled this function. “Theme Editor” might also be located somewhere else on your dashboard, but you will have to search to find it.

Click Theme Functions. This is also the “function.php” file. You’ll see this in the menu on the right. A page of code will appear to the left.

Type the following code at the bottom of the document: // Activate WordPress Maintenance Mode function wp_maintenance_mode() { if (!current_user_can('edit_themes') || !is_user_logged_in()) { wp_die('

Under Maintenance


Website under planned maintenance. Please check back later.'); } } add_action('get_header', 'wp_maintenance_mode'); This code adds a splash page warning the site visitor that the website is under planned maintenance and to check back later. You can change the text in that appears in single quotes to customize the warning message.

Click Update File. If your text is wrong, you’ll see an error page when you visit your site.

What's your reaction?

Comments

https://umatno.info/assets/images/user-avatar-s.jpg

0 comment

Write the first comment for this!