How to Put Your WordPress Site in Maintenance Mode (2024) | WP Maintenance Mode Tutorial

Поделиться
HTML-код
  • Опубликовано: 1 июн 2024
  • Learn how to put your WordPress site in maintenance mode! Boost your online presence with Hostinger’s managed WordPress hosting today 👉 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: bit.ly/3j7tP4q
    ____________________________________________
    📚 Get Our eBooks!
    7-Day WordPress Course: bit.ly/3LOJf5T
    Build Your First Website in 9 Easy Steps: bit.ly/3Ce2i4V
    ____________________________________________
    📌 Handy Links
    TOP 8 WordPress AI Plugins to Manage Your Website Efficiently: • TOP 8 WordPress AI Plu...
    Managed WordPress Hosting Explained: • Managed WordPress Host...
    Join the Hostinger Affiliate Program: www.hostinger.com/affiliates
    ____________________________________________
    ⭐ Follow Us ⭐
    TikTok: / hostingeracademy
    Instagram: / hostingeracademy
    Twitter: / hostinger
    Facebook: / hostinger
    Hostinger Tutorials: www.hostinger.com/tutorials
    Subscribe to our channel: ruclips.net/user/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 😁
    ruclips.net/user/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

Комментарии • 6

  • @HostingerAcademy
    @HostingerAcademy  3 месяца назад +1

    Boost your online presence with Hostinger’s managed WordPress hosting today 👉 bit.ly/3UV1WNh
    💥 Use the discount code WP10 to get 10% OFF!

  • @thefridgealgorithm
    @thefridgealgorithm 2 месяца назад

    Great video with useful and straight-to-the-point information. Thank you Vika, the veteran of tutorials! 😊

  • @visualmodo
    @visualmodo 3 месяца назад +1

    Truly good video!

  • @mattolinallc8888
    @mattolinallc8888 2 месяца назад

    Thank you much. I program my website from scratch and always worry how the update the sites from scratch I’m very young from Gen Z thank you so much once again.🥰🥰🥰😇😇😇😇😎😎😊😊

  • @lifelearnlovelearn
    @lifelearnlovelearn 2 месяца назад

    Great