WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I temporarily remove content from all pages, but leave up the URL?

I need to turn off all site content, but leave the URL's up so google can still find them.

...at least I think I want to do this. Basically, I am in negotiation with another site about who "owns" the content, but both of us have agreed to remove the content for 10 days during this discussion. However, I was thinking that I'd leave the URL's up so I don't get totally slammed by Google for have the entire site down. Or does it matter if there's no content.

I'd hate to lose my position in Google for being down 10 days. so anyways, is there a way to show a maintenance message for each URL until this is resolved?

share|improve this question

Depends on what you mean by "content". If you just want to remove the post body then...

function remove_body_wpse_97291($content) {
  return "Content temporarily removed";

If you want more aggressive content removal...

function remove_all_content_wpse_97291($content) {
  include('license.txt'); // example loads the WordPress license agreement as raw text; not pretty

The URLs stay the same but you replace content.

You could also redirect with (maybe) a 307 Status code, or 302 possibly,...

function redirect_all_content_wpse_97291($content) {
share|improve this answer

There is a plugin for that.

Check out Maintenance Mode by Michael Wöhrer. You can configure how long you want the site to be down, use a vanilla or WordPress Login themed page to display your site is in Scheduled Maintenance, you can even create your own template for the page in your theme and use that. It also includes the functionality to send 503 in your headers so that Google knows you are temporarily offline. There is no hit for this.

Even though the plugin hasn't been updated in years, it is a solid well thought out solution.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.