When working on your WordPress site whether you’re updating themes, modifying code, or fixing plugin conflicts it’s best to put the site in maintenance mode. But what if you can’t log in to the WordPress admin dashboard due to an error or issue?
Good news: You can still enable maintenance mode without accessing the dashboard, directly via cPanel or FTP. This article will walk you through simple, safe methods to activate maintenance mode manually, so your visitors don’t see a broken or buggy site while you troubleshoot.
What Is Maintenance Mode in WordPress?
Maintenance mode is a temporary state where your website shows a friendly message like:
“We’re currently undergoing maintenance. Please check back soon.”
This ensures your visitors aren’t confused or alarmed if your site is half-loaded or broken during updates.
While WordPress automatically enables this during core updates, you can also manually trigger it using simple file edits — even without dashboard access.
Why Enable Maintenance Mode Manually?
You may need this if:
-
You’re locked out of wp-admin
-
A theme/plugin update broke the site
-
You’re doing file-level repairs
-
You want to pause public access temporarily during migration
Let’s look at three easy methods to do this using cPanel or FTP.
Method 1: Create a .maintenance
File in the Root Directory
This is the most direct way to trigger WordPress maintenance mode.
Step-by-Step via cPanel:
-
Log in to cPanel
-
Open File Manager
-
Navigate to the folder where WordPress is installed (usually
public_html
) -
Click + File and name it
.maintenance
-
Paste the following code inside:
-
Save and close the file.
Now, when someone visits your website, they’ll see a default maintenance message like:
Briefly unavailable for scheduled maintenance. Check back in a minute.
To disable maintenance mode, simply delete the .maintenance
file.
Method 2: Redirect Visitors Using .htaccess Rules
If you want more customization (like redirecting to a custom page), you can modify your .htaccess
file.
Be cautious: .htaccess changes affect site behavior, so back up the file before editing.
How to Redirect Visitors:
-
In File Manager, find your
.htaccess
inpublic_html
-
Right-click and Edit
-
Add this code above the WordPress rules:
-
Replace
123.123.123.123
with your IP address (so you can view the site) -
Replace
yourdomain.com/maintenance.html
with your custom maintenance page
To disable, remove or comment out the code.
Method 3: Use a Plugin File Override (for advanced users)
If your site is semi-functional but admin is inaccessible, you can manually activate a plugin that puts your site in maintenance mode.
Example Using “WP Maintenance Mode” Plugin:
-
Download the plugin ZIP from WordPress.org
-
Unzip it locally
-
Upload the plugin folder into
wp-content/plugins/
via File Manager or FTP -
Open the
wp-content/plugins/
directory -
Rename the plugin folder to something like
zzz-wp-maintenance-mode
(forces it to load early) -
The plugin will auto-activate if its
maintenance.php
file is configured to do so on load
Note: This method is best for those familiar with basic PHP and plugin structure.
How to Return the Site to Normal
Once your updates or fixes are complete:
-
Delete the
.maintenance
file (Method 1) -
Revert
.htaccess
changes (Method 2) -
Disable or remove manual plugins (Method 3)
Then, visit your homepage to confirm everything works as expected.
Tips to Avoid Future Lockouts
-
Always back up before making major changes
-
Use a staging environment if your host offers one
-
Consider installing a plugin that provides a maintenance toggle in advance
-
Monitor update behavior interrupted updates often leave behind
.maintenance
files
Conclusion
Getting locked out of WordPress doesn’t mean you’re out of options. With basic access to cPanel or FTP, you can put your site into maintenance mode, keeping things professional and user-friendly while you work behind the scenes.
Whether you’re doing emergency repairs or routine updates, these manual methods help protect your site’s appearance and user trust no admin login required.
Need help creating a custom maintenance page or checking if your .htaccess
rules are safe? Reach out to our hosting provider’s support team for a second pair of eyes.