2026 Executive BenchmarkMid-Market Enterprise Modernization: How leaders across unify Commerce, Odoo ERP & AI in 90 days.
WORDPRESS

Put Your Site in Maintenance Mode Using Function.php in WordPress :

How To Display Your Site in Maintenance Mode. Put below Code in Function.php file. function wp_maintenance_mode(){ if(!current_user_can('edit_themes') || !is_user_logged_in()){ wp_...

Akshar Group Technologies
Dec 25, 2020
1 min read
Verified Source

How To Display Your Site in Maintenance Mode. Put below Code in Function.php file.

javascript
<script>
function wp_maintenance_mode(){
if(!current_user_can('edit_themes') || !is_user_logged_in()){
wp_die('Maintenance, please come back soon.', 'Maintenance - please come back soon.', array('response' => '503'));
}
}
add_action('get_header', 'wp_maintenance_mode');
</script>
And Save your File. Than See Your Site Home Page Give Your Maintenance Message.
Share this playbook
LET'S BUILD WHAT'S NEXT

What's Holding Your Business Back?

Tell us where you want to go, what's getting in the way, and we'll help you figure out the technology to get there.

No sales pitch. Confidential strategic advisory.