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?
- Top-level staging-site URL redirects to a different site
- Redirect Restricted Page to 404
- Redirect user to original url after login?
- Redirect to dashboard after login
- Make a video post redirect to next post after completion
- Redirect blog page to latest post?
- WordPress site redirects to different wordpress domain on the same server after reuploading db backup
- WordPress Redirect based on the prescence of a cookie
- Links to an exisiting Page are now redirecting to a draft page?
- Random and Erroneous WordPress Redirect
- Redirect Old domain & posts to new domain homepage
- Redirecting users to referrer page after logging in using custom login form
- Remove lost password form and URL
- add_rewrite_rule to pass entire path as a single parameter
- What is the wordpress way of displaying local external content?
- Menu links only using http after enabling https, unable to redirect http links
- Redirects from Tumblr to new WP
- Why does multisite bypass WordPress for wp-content, wp-admin, wp-includes and .php files?
- Redirecting to old domain, tried everything, nothing works
- How to modify the Register link in the login page?
- WordPress redirecting to 127.0.0.1 when accessing the site from a remote device
- Redirect a page id url but not the page slug
- Redirect based on parameter in url
- Stop wordpress redirecting www to non-www
- WordPress Global Redirect
- Why does wp_redirect strip out %0A (url encoded new line character) and how do I make it stop?
- Redirect Logged In User if page is wp-login.php and $_Get[‘level’] = X
- WordPress url incomplete redirects to first article with that name
- Redirect loop after changing nameserver [closed]
- Is it possible to incorporate username in a login redirect?
- How to make wordpress folder (/wordpress) redirect to /?
- Changing domain
- Redirecting amp url to non amp url
- Redirect htaccess does not work correctly with my new wordpress site
- Remove #wpcf7-f2450-o1 with Contact form 7 redirect [closed]
- Some posts from custom post type to subdomains
- How do I put up a splash page and have all WordPress links redirect to this page?
- W3 Cache redirects to front page when I press purge all caches
- Stop forcing certain paths to end with a forward slash
- Redirection on Custom page
- How do I redirect users after submitting a topic for moderation?
- Direct iPhone visitors to different stylesheet?
- How to delete a post and keep its slug to refer to another post
- 301 redirect any RSS feed on level up url
- Redirect loop with similar URLs
- Why does WP HTTP API switch the method (POST/PURGE) to GET when redirecting (302)?
- Redirect user to specific link after login
- 301 redirect via htaccess rules on the new site
- WordPress Domain redirects to different host
- Change the domain url?
- After retrive password, redirect to index page
- Change Category Slug Redirection
- custom login form redirect problem
- WordPress redirect to new domain name
- Bulk redirect all post
- Disable redirect to homepage after successful Login, Stay on Current Page
- WordPress no permission redirection to a popup
- Open wordpress page in directory the way index.html would open
- How force WordPress redirect to current custom page after login
- Redirect Homepage to another page when user login
- Site using static homepage, redirects (301) and removes pluses from query string
- Unusual Apache2 Error Causing WordPress Redirect Error?
- Determine user destination on wp-login.php
- 301 Redirect Loop www to non-www – Nginx + Apache2
- 301 Redirect in WordPress not working in htaccess
- Toggle Redirect Function On/Off With Checkbox
- My wordpress site has “https://” on it but when I go to Dashboard and click visit site, it removes the “https://”
- After disabling Multisite, homepage redirects to non-existing page
- redirect to https://my-site/wp-admin/ instead of https://my-site/wordpress/wp-admin/ after options updating
- Redirect after login when WordPress in subdirectory
- All links redirecting to homepage
- How to redirect non-admin/editors from specific pages?
- How to make a redirect link in wordpress?
- wp_redirect leading to an infinite loop
- Redirect after Permalink change – What regex do I use?
- Configure WordPress to listen on a port other than 80
- Redirect based on $_GET parameters
- Logging back into WordPress after logging out and having issues with ‘loggedout=true’ in redirect URL
- redirect users to the login page
- Redirect posts to sub domain except pages
- Moving an ASP Site to WordPress – Looking for Help on Redirects
- WordPress subfolders htaccess bypassing the root htaccess RewriteRule
- WordPress Redirecting Form Action to Home Page
- Redirect to Homepage if URL contains string
- How to setup an automatic redirect for when there has been a critical error on the site?
- How to force HTTP and stop SSL completey on WordPress website
- How to Setup 2 Domains on a Single WordPress (Regions Filter)?
- WordPress keeps redirecting to root site after saving any setting