Applies to: WordPress 7.1 on cPanel & WHM 138 hosting (WP Toolkit, Softaculous or a manual install)
There are three ways to "turn off" a WordPress site, and they suit different situations:
- Maintenance mode: visitors see a short "back soon" page while you work. The site and its search rankings stay intact.
- Password protection: the site is hidden from the public but still there for you, for example while you rebuild it.
- Delete: the files and database are removed for good.
Search engines treat these differently. For a pause of a day or two, a maintenance page that returns HTTP status 503 is right: Google keeps your pages. If a site stays offline for longer, or returns "not found" or "access denied" errors, its pages drop out of Google over time.
Your blog is on WordPress.com rather than a hosting account? Then use WordPress.com's own Settings › Delete site option instead; WordPress.com lets you restore a deleted site within 30 days.
Option 1: Maintenance mode
With WP Toolkit (if your cPanel has it):
- In cPanel, open Domains › WP Toolkit.
- On your site's card, turn on Maintenance mode. Visitors now see a maintenance page instead of the site; you can still log in to the WordPress dashboard.
- To change the text, add a countdown timer or social media links, click the settings icon next to the switch. The site does not come back automatically when the countdown ends.
- Turn Maintenance mode off when you're done.
With a .maintenance file (works on any WordPress install, useful for short jobs):
- In cPanel's File Manager, open the folder where WordPress is installed (the one with
wp-config.php). Turn on hidden files if needed: show hidden dotfiles. - Create a file named
.maintenancewith this line:<?php $upgrading = time(); ?>
- Every page, including the dashboard and the login page, now shows "Briefly unavailable for scheduled maintenance. Check back in a minute." with status 503.
- Delete
.maintenanceto bring the site back.
We tested this on WordPress 7.1.2. Because the line above always holds the current time, maintenance mode stays on until you delete the file, so you can't log in to WordPress while it is there. If a WordPress update ever leaves your site stuck on this message, the cause is a .maintenance file left behind by the update: delete it.
With a plugin: maintenance or "coming soon" plugins let you design the page and keep logged-in administrators able to see the site. Choose one that sends status 503.
Option 2: Hide the site behind a password
- In cPanel, open Files › Directory Privacy.
- Click the folder of your site (for the main domain,
public_html), tick the option to password protect it, and create a user name and password.
Full steps: how to password protect a directory in cPanel. Only people with the password can open the site. Search engines can't reach it either, so use this for sites that are not live yet or that you are retiring.
Option 3: Delete the WordPress site
First, make a backup in case you need anything later: see how to download a full website backup in cPanel.
If it was installed with WP Toolkit:
- Open Domains › WP Toolkit.
- On the site's card, open the three-dot menu and click Remove.
- Keep the option to delete the database ticked, and confirm.
Detach in the same menu does not delete anything: it only hides the site from WP Toolkit.
If it was installed with Softaculous: see how to remove a script installed by Softaculous.
If it was installed by hand (or you're not sure):
- Open
wp-config.phpin File Manager and note the values ofDB_NAMEandDB_USER. - Delete the WordPress files from the site folder:
wp-admin,wp-content,wp-includes, thewp-*.phpfiles,index.php,xmlrpc.php,license.txtandreadme.html. Check.htaccesstoo: remove the part between# BEGIN WordPressand# END WordPress, or the whole file if nothing else uses it. Keep any files that belong to something else. - File Manager moves deleted files to the Trash, which still counts toward your disk space. Click Empty Trash, or tick Skip the trash and permanently delete the files when deleting.
- Open Databases › Manage My Databases. Under Current Databases, click Delete next to the database from
DB_NAMEand confirm. Under Current Users, delete the user fromDB_USERif no other site uses it.
To keep the domain showing something, upload a simple index.html page to the folder.
After deleting: search results
Once the pages return "not found", Google drops them from its results the next time it crawls them. To hide them faster, use the Removals tool in Google Search Console; a removal request lasts about six months, by which time the pages are normally gone for good.
Official documentation: Temporarily pause or disable a website (Google Search Central).