Each time that WordPress inserts a blog into maintenance mode, it creates a file in the root of your installation directory.
the file contains a string related to the plugin/theme/core that is being updated. Its name is .maintenance
(doesn’t have a name, only extension).
The file stays there until the process is over, therefore you can check if the file exists by doing this:
if( file_exists(ABSPATH .'/.maintenance') ) {
// Stop redirection here
}
Which would be what you are looking for.
Related Posts:
- Host the wp-admin on another domain?
- Site redirects to wrong url when saving settings
- Force WordPress to load from site’s hostname
- Some admin pages redirecting to front page on save
- Two WordPress installations: One in root and one in sub directory – no images in subdir installation [closed]
- How to redirect the frontend of a WordPress site (only)?
- Permalinks do not include www subdomain
- When i try to enter subdomain i’m redirected to main domain
- Can’t login to WordPress admin panel after changing domain to use WordPress pages as a fallback from React
- Need to redirect from Apache2 Ubuntu Default Page to home page in wordpress
- I have cloudflare flexible enabled, How to redirect to https for Nginx server
- How to Block WordPress from subdomain?
- When I change slug, will WordPress create redirect from the old URL?
- Why am I getting a 301 on a existing post?
- Non-WordPress page in subdirectory under WordPress page
- Keeps on redirecting on my development copy
- Password change when the user login first time
- Custom login form redirect to external site
- Clarification on auth_redirect()
- Exclude a path from WordPress using .htaccess redirects (Apache)
- Restrict Access to wp-login.php
- Redirect to custom URL after registering from a page with registration form
- Stop unwanted WP redirection to new url
- Problem to redirect custom page using htaccess
- WordPress within a subdirectory of another WordPress environment doesn’t work
- WordPress Customizer: custom redirection after closing
- Website redirecting to old domain name
- How to do 301 redirect to Sub page using htaccess file?
- Does WordPress automatically redirect url without parent slug?
- How to redirect user to specific page based on the input password
- Strange redirection issues on wordpress from ssl with padlock to ssl without padlock
- Change gravity forms confirmation redirect query string to include entry id [closed]
- How to redirect visitor to a custom URL using PHP code in functions.php
- Redirect home to another page with htaccess
- How do I redirect /search/ to ?s=
- 301 Redirect Loop
- Infinite loop behind SSL proxy on non-standard port
- Redirect from home page to post list page?
- set up 301 redirect within wp-content/uploads/ directory of a WP site to a new image URL
- How to redirect user after login to a specific page?
- .htaccess rule to redirect old URLs to new structure [closed]
- .htaccess Redirect
- Redirect when accessing /login when logged in
- Built-In Postname Redirection vs Hard Redirects in relation to SEO and performance
- Local Environment Stripping Port Number…help tracking down the redirect?
- User is logged in after Stripe payment, then redirected, but is then logged out again
- How To Fix A Redirect Chain
- Redirect “http://old.net/category/postname” to “https://new.com/postname”?
- Image URLs not redirecting properly
- After logout browser’s back button into twenty sixteen theme profile
- 301 Redirect Old URL to New WordPress Page
- Login Redirect – Multiple Scenarios
- URL masking of subdomain to main domain using .htaccess
- How to use different domains for different blogs hosted in the same host in subdomains with .htaccess
- Redirect outside WP after login
- Redirecting from wp-content?
- Redirect non existing page to frontpage
- How do I do a redirect to WordPress permalink with post id via htaccess?
- Redirect user on first visit based on geographical location
- Create a permalink to a pdf?
- My site doesn’t redirect from HTTP to HTTPS
- Bedrock WordPress
- Redirect one domain to another
- Only execute function if SSL is set up properly
- Redirect User to login page
- How to redirect user after login to the page called by his first name?
- Redirect after get_delete_post_link
- Whenever I try to publish a post in wordpress, I always get redirected to the installation page…why?
- Is it possible to detect if a POST action is for a “Save Post” before the save_post action?
- Login redirect to previous page
- Disable and Hide WP-JSON
- Redirect when not logged and parametr in link
- Browsers Forcing Multisite to https
- Hide a Post everywhere except on redirect
- Keep the old referrer after failed login
- How to 301 redirect WP posts id “/c/94940894” to permalink with post name?
- URL redirect regular expressions redirecting all after first viriable
- 301 Redirect Link to Media
- WordPress Redirect post to outside website based on useragent
- How to create mass 301 redirects with PHP in Nginx server without using a WP plugin
- HOW do you Redirect buddypress login to EDIT tab not PROFILE tab on profile page? [closed]
- WordPress redirects to backend when i’am not logged in
- Redirect to custom admin menu after plugin activation
- Redirect HTTP request to HTTPS request
- Woocommerce login to specific page or referrer
- 301 Redirects when change URL in WordPress database
- How can I redirect to another page with screen already at the bottom of the page?
- How is this URL being redirected?
- What’s the best way to redirect to a new wordpress website?
- 301 Redirect only for posts
- How to move a https website back to dev and access the admin?
- Why is WordPress redirecting to homepage after GET form submit?
- Redirect after user changes password
- Custom Form Redirects to Post after Submit
- URL is redirecting (301) when query string is passed through URL
- Plugin html-on-pages: URL not redirecting
- Hide page for user logged and redirect for profile? [duplicate]
- Redirect a WP to another with all URL
- Redirect ignore last URL segment
- Creating custom link that redirects to a another link