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?
- Using wget to create a static mirror of a local WordPress installation
- Annoying “JQMIGRATE: Migrate is…” in console after update to WordPress 4.5
- WP_DEBUG is not set, but I’m still getting warnings
- How to pass parameters to admin_notices?
- How to Create Editable Blocks of Text for the Homepage?
- Is there anything like admin_notices for front end?
- How to stop showing admin notice after close button has been clicked
- get_the_ID() gives notice in 404 page
- 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
- wp_logout_url() – WordPress Failure Notice
- admin_notices after register_uninstall / deactivate_hook
- 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?
- Using wordpress for a four-page website may be an overkill?
- How to add a link to the tax term in the admin Edit page?
- Non-wordpress subdomains on Multisite Installation
- Admin Notices coding standard issue
- Change message given when deleting post from custom post type
- How can I show the actual content of Posts page because the_content() is showing all blog content?
- Can wordpress run in root of existing php site with no theme on index.php but all other WP posts/pages?
- Remove Admin Notice on page refresh
- How to notify the admin about something that happened during a cron job
- How to change the location of admin notice in html without using Javascript?
- admin_notices not displaying in plugin
- my theme breaks WP export
- Warning Notice $wpdb->prepare incorrect number of arguments passed
- Notice: wp_enqueue_script was called incorrectly
- PHP notice coming from the WordPress core?
- Notices on the front-end
- Is there a way to hook into the update-core page for custom messages?
- Use htaccess to redirect WordPress to static website in a subfolder
- Method to make definitively static an abandoned WP blog
- What is the callback sent to add_submenu_page() invoked by WordPress?
- 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
- Alter admin notices to remove message that contain a certain string
- Make WordPress cache permanent for some pages until edited
- 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
- How to display a WordPress notice on create_term action
- Control Content On Non-Blog Pages
- Notify Jenkins of new post on WordPress
- How to do persistent data on Front End?
- How to embed JS data viz in a simple WordPress website
- 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?
- Display popup or admin-notice after add new categories
- 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
- How does one dismiss the ‘upgrade notice’ when managing upgrades with SVN?
- CPT Validation to not show “Post updated.”
- Show error message after exception handled
- WordPress custom admin notice still displays after wp_insert_post_data validation
- Getting notices on fresh 3.6.1 install
- Show message in media-new.php
- 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
- Plugin Options Array Set to Undefined
- retrieve post data and insert it in seperate static html page without WordPress
- 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]
- register_setting & add_settings_error validation issues with multiple fields