How to Put Your WordPress Site in Maintenance Mode (2024) | WP Maintenance Mode Tutorial
Hostinger Academy Hostinger Academy
240K subscribers
2,594 views
0

 Published On Premiered Feb 29, 2024

Learn how to put your WordPress site in maintenance mode! Boost your online presence with Hostinger’s managed WordPress hosting today 👉 https://bit.ly/3UV1WNh
💥 Use the discount code WP10 to get 10% OFF!

Whether you're rolling out new updates, making design changes, or troubleshooting, enabling maintenance mode ensures that your visitors are left in the dark.
In this video, you’ll be guided through the easiest ways how to put WordPress in maintenance mode.
____________________________________________
🎓 Register to Our Course: http://bit.ly/3j7tP4q
____________________________________________
📚 Get Our eBooks!
7-Day WordPress Course: https://bit.ly/3LOJf5T
Build Your First Website in 9 Easy Steps: https://bit.ly/3Ce2i4V
____________________________________________
📌 Handy Links
TOP 8 WordPress AI Plugins to Manage Your Website Efficiently:    • TOP 8 WordPress AI Plugins to Manage ...  
Managed WordPress Hosting Explained:    • Managed WordPress Hosting Explained: ...  
Join the Hostinger Affiliate Program: https://www.hostinger.com/affiliates
____________________________________________
⭐ Follow Us ⭐
TikTok:   / hostingeracademy  
Instagram:   / hostingeracademy  
Twitter:   / hostinger  
Facebook:   / hostinger  
Hostinger Tutorials: https://www.hostinger.com/tutorials
Subscribe to our channel: https://www.youtube.com/c/HostingerAc...
____________________________________________
🕒 Timestamps
00:00 - Intro
01:56 - Using the Maintenance Mode Feature on hPanel
03:09 - Using a WordPress Plugin
04:42 - Using a Custom Function
05:58 - Tweaking the .htaccess File
___________________________________________
When implementing significant updates or changes to your WordPress site, activating maintenance mode prevents users from encountering broken pages or incomplete features.
Fortunately, implementing it on your site requires just a few simple steps.
In this video, you’ll see the video tutorial on how to put a WordPress site in maintenance mode, starting from the simplest to the most advanced methods:
🟣 Using the Maintenance Mode feature on hPanel
🟣 Using a third-party WordPress plugin
🟣 Using a custom function
This method requires editing your site’s functions.php file. That’s why backing up your site before going to proceed with the steps is a must.
Copy this code block to your active theme’s functions.php file:
// Activate WordPress Maintenance Mode
function wp_maintenance_mode() {
if (!current_user_can('edit_themes') || !is_user_logged_in()) {
wp_die('/h1/Under Maintenance//h1\/br /\Website under planned maintenance. Please check back later.');
}
}
add_action('get_header', 'wp_maintenance_mode');
If you use macOS, the code might be pasted using curly single quotes. Double-check the code and ensure you’re using straight single quotes instead.
🟣 Tweaking the .htaccess file
You can also edit your site’s .htaccess file. However, creating a backup is a must if you want to go with this method.
Note that activating maintenance mode in this way will make your WordPress admin dashboard inaccessible during the process.
Applying this method is recommended for those with extensive WordPress technical knowledge.
That being said, here’s the code block you should use:
BEGIN MAINTENANCE MODE
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/maintenance\.html$
RewriteRule ^(.*)$ example.com/maintenance.html [R=503,L]
END MAINTENANCE MODE
Just don’t forget to change example.com with your own domain name.
___________________________________________
▶ Want to see more awesome tutorials like this in the future? Consider subscribing 😁
https://www.youtube.com/c/HostingerAc...
____________________________________________
Thank you for watching! Let us know in the comments below if you have any questions. Good luck on your online journey. 🚀
#HowToPutWordPressSiteInMaintenanceMode #WordPress #HostingerAcademy

show more

Share/Embed