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]
- Is it possible to use wordpress on some pages of my site only?
- Annoying “JQMIGRATE: Migrate is…” in console after update to WordPress 4.5
- 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?
- Change message given when deleting post from custom post type
- 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
- Admin Notices don’t display on the admin screen for certain post
- PHP Notice: Undefined offset: 0
- 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?
- how to setup content on a static frontpage with css and xhtml
- 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
- WordPress custom admin notice still displays after wp_insert_post_data validation
- pull non-wp site into content area of wordpress -or- pull wp header into non wp site?
- Should I use “Categories ” or “Pages” for a WordPress Static Site (A non blog site)?
- Need help with making a website where user can add products
- Debug Notice: X is deprecated since version 4.5! Use Y instead
- retrieve post data and insert it in seperate static html page without WordPress
- Getting admin notices to appear after page refresh
- Displaying “One Time” Notification in Plugins
- WordPress page/blog incorporated into static website
- How to create Admin Notice from Plugin with argument? [duplicate]
- register_setting & add_settings_error validation issues with multiple fields
- How to edit mobile view of my wordpress website without affecting the desktop view? [closed]
- admin notice on Insert Media popup screen
- Problem with display data from get_option
- Dynamically set taxonomy term and show admin notice on post save
- wp_new_comment requires author url and author email
- Edit specific text on a static page
- Trying to get property of non-object wordpress error message
- Static Website No Titles But Still Nav
- W3 Total Cache Help – How to update DNS Zone for a static domain [closed]
- Is there a way to call via javascript if a user is logged-in on a static html file?
- Hide all Admin Notices and move on a separate page
- Notices are render inside sub-menu’s content
- admin_notices is not working inside function
- Set up new WordPress domain using unclear files
- How to set condition for all posts with one label
- Is it possible to push admin notices to one specific user instead of all users?
- Generate Static Page to Show Search Results/Detail for API
- Pages not displaying as sections on static page
- Find out if post was just updated on post edit screen
- Trying to get property of non-object notices in comment-template.php
- WordPress Page All Content In Template Good Or Bad Convention?
- What is the best way to create very custom campaign pages?
- Incorporate single WordPress page into an existing static website [duplicate]
- Notice: Undefined index: in options-framework.php
- Notice: Trying to get property of non-object in options.php
- Static pages not being allowed
- Notices when submitting custom post type from front-end
- Some informations about the use of statics pages in WordPress
- How do I put a word-press blog into my static site without installing wordpress on server?
- Convert WordPress to static website by using the pages generated by the caching plugin?
- 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
- is_embed and is_search called incorrectly by wp_robots filter
- How is wp_admin_notice supposed to work?