Recent Topics

How do I take my blog offline?

Started by on Feb 24, 2007 – Contents updated: Feb 24, 2007

Feb 24, 2007 20:05    

My b2evolution Version: Not Entered


I want to take one of my blogs offline but don't delete it.
I just want to make sure no one can read it anymore.
Setting all entrys to private is a bit too much work.

Tried to set all entrys with phpmyadmin to private but haven't found where to set it.

Thanks in advance

Feb 24, 2007 22:51

The ease of doing this depends on how many categories you have in the blog you want to make private. Even though we think of posts as being in a blog with a category, the database stores them as attached to a category which happens to be assigned to a blog. So you're going to need a list of all the category numbers for the blog in question. Then via phpmyadmin something like this should get it done for you:


UPDATE `evonet_posts`
SET `post_status` = 'private' WHERE `post_status` = 'published' AND `post_main_cat_ID` LIKE 'NNN'

NNN is each main category ID for the posts you want to hide. So like a post in 5 cats will be hidden by doing the query to the main cat for that post.

Backup your database first! To test if it's working you'll have to either log out of your blog or visit your site in a different browser and see if posts are "going away" after each time you do the query. BTW since you didn't pick a version I figured it must be 192 and came up with a query that'll work for that release. Or at least I think it'll work!

Feb 25, 2007 13:05

will try it soon, thanks a lot!

p.s.: got version 1.9.2

Mar 20, 2007 14:40

Thank you very much.

I did it today and it worked like a charm.
Very nice work!

May 28, 2008 20:05

For future reference a blog can be hidden by a password:
in inc/ about line 360


if( !isset($login_required) )
   $login_required = false;



if( $blog == "2")
   $login_required = true;
else{$login_required = false;}

where the blog number is the number of the blog you want protected. You can also remove link in admin.

May 28, 2008 20:22

it's strange no one has mentioned maintanence mode.. afaik no one can reach the blog in maintenance mode also

May 28, 2008 20:44

Well I would if I could find how to invoke maintenance mode?? Can you direct me to the option tilqicom?

May 28, 2008 20:47

crack open basic.config.php and set


$maintenance_mode = 1;

May 28, 2008 21:17

Ah! :) Won't that do all the blogs though?

Jan 03, 2009 08:01


I just ran across this thread.

Although I haven't tried this, it is good to know that the maintenance mode option exists because it can be done in software like Mambo.

I guess if it applies to all of the blogs, I'd think a condition statement can be added to apply to selected blogs.

Jan 03, 2009 12:38

Chose the blog you want hidden '2' and something like this maybe?


if($blog == "2")
  $maintenance_mode = 1;;
else{$maintenance_mode = 0;}

Jan 15, 2009 02:15

maintenance mode is way deep. It'll lock you out of your back office as well.

Jan 17, 2009 05:51

:) Hi Guys,

My suggestion is you must have the ability and content for this.

Thanks for sharing

*my crap removed

Jan 30, 2009 02:53

Easier: in the main php of the blog we will make private (for example blog2.php) we write:
$login_required = TRUE;

Form is loading...

Run your own website! – This forum is powered by b2evolution CMS, a complete engine for your website.