The quick and dirty way to do it is to create a file named .maintenance
at the root of the site– same directory as license.txt
— and add a bit of PHP:
<?php
die();
Of course, you can create whatever markup and messages you’d like before the die();
, but there is very little WordPress available since it fires very early in the wp-settings.php
file.
If you want to see how to add and remove the file automatically, look at how the core does it.
Related Posts:
- Creating a Static Website based on a WordPress Website?
- Installing WordPress in a subdirectory with static HTML sites
- Can I Create a Static-Content Site With WordPress?
- Starting a WordPress site
- Create “static” textareas controlled from admin section, how?
- WordPress Posts on Static Pages
- Accessing internal wordpress site from the web
- I need to modify the source code from my static page
- Move static site to WordPress [closed]
- How to Create Editable Blocks of Text for the Homepage?
- How to stop showing admin notice after close button has been clicked
- Close a wordpress blog – keep site as it is but prevent hacks
- Hide php Notices in Dashboard
- Create a Static HTML Site from WordPress
- How to Make an admin_notices Message That Disappears Once the User Leaves That Particular Page?
- How to customize post edit notices
- WordPress admin notice in plugin function
- register_sidebar notice [closed]
- Undefined property: stdClass::$labels in general-template.php post_type_archive_title()
- Add custom post notice after post delete
- How should I best incorporate WordPress in my static website?
- Is it possible to set a option, and then redirect to another page directly from a admin notice link?
- How to stop subdirectory wordpress install adding head elemets to entire site?
- How do I fire a snackbar notice in admin?
- How to add a link to the tax term in the admin Edit page?
- Can wordpress run in root of existing php site with no theme on index.php but all other WP posts/pages?
- How to notify the admin about something that happened during a cron job
- admin_notices not displaying in plugin
- my theme breaks WP export
- Warning Notice $wpdb->prepare incorrect number of arguments passed
- PHP notice coming from the WordPress core?
- Notices in the Block Editor with multiple lines
- Wordpres debug.log PHP Notice: is_singular was called
- wp-includes/comment-template.php:26 – Trying to get property of non-object
- How do I add an admin notice within javascript in the admin interface for posts?
- Cannot DIsplay a Snackbar Notice on Button Click – Notice is undefined
- WordPress notification reports
- Mute Debug Messages from Plugins
- Notice: Trying to get property ‘term_id’ of non-object
- Control Content On Non-Blog Pages
- I want to hide header in the static homepage that I am working on [closed]
- How to inform the user that the save was not successful?
- Popup or admin/update notice on post/page edit screen without page refresh
- Deprecated issue in WordPress [closed]
- How to throw admin notice error on image upload
- How to disable admin notice in child theme? [closed]
- Plugin activation/deactivation page transitions with page parameters, then vanished
- Show error message after exception handled
- Show message in media-new.php
- Plugin Options Array Set to Undefined
- relocate woocommerce notices/messages on Cart page
- Getting admin notices to appear after page refresh
- Show message from backend
- how to import a custom website into WordPress
- Displaying “One Time” Notification in Plugins
- WordPress page/blog incorporated into static website
- How to remove ‘wordpress…’ text from page titles in tabs
- How to create Admin Notice from Plugin with argument? [duplicate]
- How to import a WP backup website into another WordPress hosting?
- Can not add admin notices from the edit_user_profile_update hook (notices not being displayed)?
- How to stop showing my under development site on Google Search [closed]
- Hide admin notice when user profile updated
- admin notice on Insert Media popup screen
- Want to add cart and a search bar in the right of logo line
- wp_get_http has been deprecated. Use WP_Http instead
- Static Website No Titles But Still Nav
- Problems in creating a static site with WordPress
- WordPress multiple admin notices on post update/add
- How $_GET[‘updated’] variable is passed when updating a user?
- How can i showcase all my galleries?
- Changing the HTML of notices in WooCommerce [closed]
- Hide all Admin Notices and move on a separate page
- Changing wordpress/woocommerce notices default message to other languages (text)
- How to display only specific Error types in debug.log? No notices, warnings, etc
- Troubleshooting Admin_Notice
- How to list newly ftp added HTML webpage under Pages section of wp-admin?
- Set up new WordPress domain using unclear files
- Is it possible to push admin notices to one specific user instead of all users?
- Static Page with php echo [duplicate]
- Use wordpress for /blog section only and all other pages static, but using same footer.php and header.php
- twenty seventeen customizer duplicates section content
- Get property of non-object on theme activation
- Page Permalinks: Custom URLs
- WordPress Page All Content In Template Good Or Bad Convention?
- Wonderflux Framework Static Homepage
- A more elegant way to handle notices/warnings
- Unable to render Admin Notices
- Call/Run a Mathematica (.m) Shell Script from WordPress Page/Blog
- Hook into admin_notices after sending mail
- Incorporate single WordPress page into an existing static website [duplicate]
- Notice: Undefined index: in options-framework.php
- can not call functions in function.php
- Confused on loading page content
- Notice- undefined variable post and trying to get property of non-object
- Full Width Container Colour Problems
- How do I put a word-press blog into my static site without installing wordpress on server?
- Static html/css/javascript front end connected to WordPress
- A way to upload old html pages with all its assets via WordPress admin and to add a fixed menu on top of those (a la Wayback Machine)
- Display notice in block editor after wp_insert_post_data hook
- Installing wordpress into the same directory as existing static html website