In the course of setting up WordPress on DeepWave, I wanted a way where subscribers and editors/writers would not need to see the Dashboard in the Admin Control Panel. I noticed a number of people had suggested various hacks and changes in WordPress code to make this happen. But as we all know, we shouldn’t hack code because it would be a pain to upgrade. So I decided to take the various methods outlined on the net and make a small WordPress plugin that would do the trick. I therefore present the Hide Dashboard plugin!
Please bear with me as PHP is not one of my regular programming languages, and this is my first WordPress plugin after all, so if there are any bugs or problems, do let me know. Aside from that, enjoy!
To see this plugin in action, just register and login to this site. Alternatively, here are some screenshots:
These are images showing the effect of the Hide Dashboard
plugin for ordinary Subscribers. On the left, Hide Dashboard is deactivated, while on the right, it is activated. Below is the same for an Editor:
Latest News: (2007-11-10)I’ve just updated Hide Dashboard to version 1.1. The big change here is that I’ve added a widget for widget-enabled sidebars to use Hide Dashboard’s Meta instead of the
WordPress default Meta section. This is done because the default
WordPress Meta Login will direct subscribers and admins to the Dashboard page - which we’re trying to avoid (for subscribers anyway) in the first place. So now, when people login using Hide Dashboard’s Meta widget, it will take them back to the web page, and they can click on “My Profile” to see their own profile. I think this makes more sense for the default case. To see this sort of thing in action, try DeepWave.Net’s register and login functions above. Alternatively, if you do not have a widget enabled theme, then try using a
WordPress theme like
Serene which has Hide Dashboard’s login functions built right in. Additionally, this has been tested and is working fine on WP 2.3.1..
Download Hide Dashboard Plugin 1.1
Oh thanx, that’s one plugin I’ve really been looking for!
Thanks! Just what I needed.
I installed the plugin and it appeared to be ok. I then went to my blog and I can’t see the blog anymore. I can still access the blog via the admin panel, but when I go to the homepage all I get is a blank screen.
I uninstalled the plugin and deleted it, but its still broken.
Help! What did your plugin do to my blog and how do I fix it?
I forgot to mention I am on Wordpress version 2.0.6.
Currently I am using 2.0.5, so I have not tried 2.0.6.. But that said, the plugin does not have any function that affects the normal blog operations, only the admin pages.
Do you see any errors when trying to view your blog?
I dont see any error messages. I only get the following
With Firefox I get a totally blank page and no visible HTML code.
With IE 7 I get a broweser error message saying the page is not available.
However as I mentioned I can still access the admin with no problem.
I have the Maintenance Mode plugin installed and when its been activated, you will its message when hitting the home page. However when its turned off and the page should show, you get nothing.
Its weird, and frustrating.
I’ve just setup a brand new clean WordPress 2.0.6 with Hide Dashboard 1.0 and Maintenance Mode Plugin 2.2 with no problems at all. Everything appears as it should be..
Are you trying to use PHP5+FastCGI via a shell script? I get a blank HTML page when I do that on my web hosting account.. This issue was never really resolved, unfortunately..
Hi Patrick
I do have this line in my .htaccess
AddHandler x-httpd-php5 .php
I removed this and now the site appears to load. I guess this must be the problem.
Although I dont understand why after removing the plugin and even deleting it, its still being affected by this code.
Previously with the same code in my .htaccess my site worked just fine. After I installed the plugin it no longer works even when the plugin itself has been deleted.
Any ideas?
Unfortunately, i never got php5 to work at all.. so your guess is as good as mine.. My php+fastcgi (as recommended by my hosting provider) is as follows:
.htaccess:
AddType application/x-httpd-php5 .php
Action application/x-httpd-php5 /php5.fcgi
and php5.fcgi is:
#!/bin/sh
PHP_FCGI_CHILDREN=2
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=500
export PHP_FCGI_MAX_REQUESTS
I never got WordPress 2.0.5 in general to work with this.. In fact phpinfo() also didn’t work for me..
Hi Patrick
I’m a lot closer to the cause of the problem.
What I did was to create a brand new install of WP 2.0.6. I then changed my WP database source to point to the new database and my site loaded ok.
So it appears something got changed in the database when I installed your plugin.
Then I discovered something else. I created a duplicate wordpress install using the old database and it never came up as was the case before, which reinforced my view that something got changed in the database and thats why removing the plugin had no effect.
I then went through disabling all the other plugins and kept trying to load the site. It was the same until I deactivated the plugin “Related Posts 2.04″ plugin.
Once I deactivated it the site was able to load.
So it appears you have some conflict that occurs with this plugin.
I haven’t had the time to examine the table yet, but when you install the “Related Posts” plugin you have to make the following changes to the wp_posts table:
ALTER TABLE `wp_posts` ADD FULLTEXT `post_related` (
`post_name` ,
`post_content`
)
I’m guessing that whatever got messed up happened in this table.
Thats it for now. I hope there is a fix to this because I think your plugin is very useful and it appears to be the only one out there that does this job.
Thanks for your help.
Update.
I did a quick check and it appears the cardinality was changed in that table that got altered.
I dropped that index and recreated it and the cardinality showed a different value, before it showed a zero.
I’m not sure what that means but maybe you do.
plugin doesnt seem to work. when i login i am still directed to the dashboard.
Hi,
This plugin sounds great, unfortunately my users still see Dashboard when they login.
Please advise.
Thank you
I found a solution here: http://www.ilfilosofo.com/blog/2006/05/24/plugin-remove-the-wordpress-dashboard/
Unfortunately this also removes the dashboard for all users including administrators.
Solutions?
Hi Lawrence,
What’s the “Related Posts” plugin? I don’t have that.. As far as I can tell, if you look at the Hide Dashboard code, the only items are a hook “add_action” and “add_filter”, which I don’t think modifies the database in anyway.. So it is really strange to hear that the DB got changed. My guess is that this problem is either extremely complex, or extremely simple
I must admit, that I don’t know PHP nor WordPress that well, so maybe I am unable to answer your questions completely, so if you have any further ideas to help solve this problem, I would be most grateful
Shaun, Bob, what versions of WordPress are you running? I’m using 2.0.5..
Regarding ilfilosofo’s code, it actually is similar, the difference is that Hide Dashboard has a “if(!current_user_can(’level_10′))” check to _NOT_ hide the dashboard for Admin users (level 10 permissions and above).. But their code also uses “add_action” although on a different admin item..
OK, I have set up a brand new WordPress 2.0.6 install (on my current web hosting), with a new database, using PHP5 (as above). Installed and Activated Hide Dashboard plugin and tested logging in with a subscriber account. Made sure that the main test page works fine as well. Logged out, and retried with Admin etc. No issues found.
Then I deactivated, and then deleted the plugin, still no problems. Everything works fine.
So since I am unable to reproduce the error, I’m not sure how next I can help to troubleshoot this issue.. Anyone with ideas/suggestions?
Shaun, Bob,
Forgot to add that Hide Dashboard only hides the Dashboard for users below Level 10 (Admin), so if you login as Admin, you _WILL_ see the Dashboard, but if you login as Editor, Subscriber, etc, then you won’t see it.. It will go straight to Profile for those users.
I tested to see if it was a plugin conflict - it doesn’t seem to be. Also I have not changed the core code at all.
I too am running a fresh 2.0.6 install. Hmm… don’t know what to suggest really.
Oh, and I have logged in and out as different levels of users with no luck.
Hmm, Very strange indeed.. Well, all I can say is that the DeepWave (and Eileen’s Blog) are both currently running 2.0.6, PHP5, along with a whole bunch of plugins (see the “About DeepWave”) and do not seem to be having any problems..
I admit, I am stumped.
Anyone out there have any ideas how to debug this issue further?
Thx a lot! I need it really!
Not works!
AveriFire, any information as to your setup what you mean as not working? What version of WordPress are you running and are there any other plugins that may conflict with this?
Hi -
Running the latest version of WordPress here. As a subscriber logging in, the plugin works fine, but for Authors/Contributors/Editors, the Dashboard frustratingly appears after login, though the button is not present on the navigation bar. So for users who are not admins and not subscribers, the dashboard will appear when the user first logs in (that’s where they’re redirected to) but the Dashboard is not visible in the navigation. if you could figure out a fix so the login redirects to the write tab for contributors/authors/editors, this plugin would work quite excellently for us
hi…it doesn’t work for me too!!!!
i running wp2.06 and a mamp-server.
cu
I installed the plugin with WP 2.0.6 and get the same behavior reported by Jonathan in comment #25. Fortunately for my purposes, I don’t mind if all users except for Subscribers see the Dashboard. I ended up hacking your code somewhat so that the Dashboard and Users menu links are hidden only hidden Subscribers. I couldn’t fix the redirect issue though. Hope you can fix it, as otherwise this is a great plugin.
Hi Jonathan, Nyomi,
I think I’ve figured out (slightly) why your uses seem to still see the Dashboard. In my pages, I have a sidebar link to “wp_register”. Hide Dashboard currently hooks into it, and it redirects people straight to their profile. However, I also have a code hack to redirect people back to the main page after logging in, so I do not see your situation.
I’m bogged down with real work right now, but that said, I think I understand what I have to do, so I will try to get that fixed..
On the other hand, I am going to try to setup WP2.1 and move this site onto 2.1 and update Hide Dashboard to support it. So I hope you will bear with me..
Thanks!
Great plugin. How do I remove or add “Category” link like “Write”? Also, how would I go about removing sublinks like “Post” under the “Write” link? This is what I really need to do. I don’t want users to be able to see the “Comments” link.
Thanks for any help or ideas.
Dave,
Try using the plugin called Role Manager.
[…] Daarnaast kan het nog handig zijn om ook het Dashboard niet te laten verschijnen in het admingedeelte van WordPress. Deze verwijder je dan in WP 2.1 het eenvoudigst met Hide Dashboard van Patrick Khoo. Wanneer je bepaalde delen van het Dashboard verwijdert wilt hebben, gebruik dan Dashboard Editor van Aaron Dowden. […]
why do i have to register on your site simply to download your plug-in? others simply let you download plug-ins without the hassle.
[…] ???????DeepWave » WordPress Hide Dashboard Plugin ??? […]
Hi Patrick
It looks like a great plugin.
I am using 2.1.2 do you know if it works on it?
Regards
Johan
Hi Patrick
Thanks.
It works on 2.1.2
Is it possible to redirect them to the index page instead of the profile page?
Regards
Hi
Not to worry. I got hold of this plugin and it’s doing a great job:
http://www.thedailyblitz.org/weasels-login-redirect-text-replacement-plugin
Regards
Johan
Your plugin is a work of art. Thanks.
However (I’m running wp 2.1.3) a little issue maybe I’m doing something wrong, I find that when I go into Author level with Hide Dashboard it works well and hides both Dashboard and Profile.
I’m using login re-direct plugin to go directly to Write Post tab/screen. However, when I click on the View Site hyperlink my site comes up and in the upper right corner I now see Dashboard, Write, Manage, Comments, Profile and Logout.
Is there anyway to hide the Dashboard and Profile tab from this area as well?
testing example http://accmachine.com/test
testing author username = Test123
testing password = bluefly
Am I doing something incorrect?
Thank you in advance.
Regards,
Robert
Very new here. I’m using wordpress mu 1.2.1. Will this plugin work for it?
O, and where do I install it?
Hi, thanks for this plugin, but dont work in my wordpress, because when i log in with non admin user, i see the Dashboard, dont redirect to PROFILE, but the link DASHBOARD in the menu, dont see.
Please help me.
[…] Visit […]
@Robert
thanks for your “error” — it made me aware of the semiologic “admin menu” plugin (which I suspect you have activated): it does exactly what you describe: pull the admin menu links to the top of the front-end
http://www.semiologic.com/software/admin-menu/
/ Peter
Great plugin — is there a way to edit it so that it would hide other pages in addition to the admin panel? I’d like to hide the “comments” and “manage” tabs. Any help would be appreciated.
Nice plugin but it’s half done if I may say.
In the readme file you say :
Well, it hides the Dashboard for all non-Administrators, but you can still get to the dashboard by URL on the Location bar
In any case, this just makes it a little easier for end-users..
This is a big issue if any suscriber can manually access to the dashboard. Even if some don’t know how to do it, typing index.php in the location bar is no big deal.
Ilfilosofo plugin gets a pluggable error and yours is by far better. If you could make something about this access to dashboard issue, it would be perfect.
Thx a lot for what you already did
[…] klick mich […]
[…] For those of you, who are like me, that might not have upgraded to the lastest version of Wordpress, You might want to consider doing so. I added DeepWave’s Hide Dashboard Plugin to to hide all my information form subscribers that might be using there subscription for spamming and information gathering purposes. It’s always safe to do a backup of your database and blog files whenever possible. I know I don’t do that enough either. For sure everything is ready now in case of an emergency. […]
Dashboard is not hidden for authors?
[…] ???????DeepWave » WordPress Hide Dashboard Plugin ??? […]
Hi nice plugin.
Works great.
To further complete it would be to redirect from the dashboard (even if accessed from url). It’s a very easy fix to do via directly editing the index.php
Wrote a step-by-step: http://www.pftq.com/blog/2007/08/03/hiding-wordpress-dashboard-completely/
Do you think you would be able to combine this edit into your plugin? It is not a function so I’m not sure…
Thank You.
Your plugin is fantastic! Just what I needed.
Works PERFECTLY! Thanks very much.

[…] Más información y descarga del plugin con algún ejemplo en forma de captura de pantalla. (ENG). […]
nice! i’ve never figured why a site user would want to get updates on wordpress plugins et al… turning it off on several sites. now.
[…] Enlace: WordPress Hide Dashboard Vía: daboBlog […]
[…] Wouldn’t it be nice to be able to hide your website dashboard from your registered visitors. After all, you are probably the only person who should be managing your website. The Hide Dashboard plugin does just this. This plugin allows you to manage your administration dashboard visibility based on the role assigned to your registered visitors. […]
This must be the best Wordpress plugin ever! I have been looking for a way to hide the dashboard from subscribers for a long time and your plugin did it!
Thanks for making the plugin.
i can’t get this plugin to work with WP 2.3.1-RC1.
does anyone have this working with the WP 2.3.x series?
I’m running 2.3.1 and it works for me. Just log in as a subscriber, author or editor and you’ll notice the lack of a dashboard.
I was thinking this would remove access period to the admin area, all this does is hide certain items, i’d rather disable admin for all non-admin users
pftq (7:20 pm, Friday, 3 Aug 2007):
Yes, your solution is correct. However, it requires users to edit the WP code. Although I myself (and probably a whole bunch of others here) can do so, I would rather not suggest such a thing because it would play hell for upgrades. So check out this newest version 1.1, and try the widget instead. No more manual editing of php files needed
Hi,
I installed wordpress 2.3.1 and this plugin is for SUSCRIBER Role only, that’s right?
[…] Visit & Download […]
[…] Visit & Download […]
It took me 3 hours to find your plugin but I knew someone had the same need as me somwhere…
I have not looked the code, but it works well, so great job,
Thanks
Thanks for the great plugin. I have another plugin called Subscribe2. It allows people to subscribe/unsubscribe to my blog content/posts by selecting certain categories to receive automated emails. Your plugin suppresses that page/tab also. Can you give me a tip as to how I can reveal the plugin subscribe page?
Plugin page - http://subscribe2.wordpress.com/ Version 4.2 and I have Wordpress V2.3.1.
Thank you !!
replacing dwlogin with this code will allow you to control which page receives the redirect:
function dwlogin_redirect() {
global $redirect_to;
if(!current_user_can(’level_10′)) {
$redirect_to = get_option(’siteurl’).’/wp-admin/edit.php’;
}
}
Now can anyone enlighten me on how to PERMANENTLY prevent access to wp-admin/index.php (without hacks of course)?
Scott,
Perhaps I need some additional explanation. Exactly where does this code exist (location/filename) and what effect will this have on the plugin? Need to pick your brain a bit to get the “big picture”!
Thanks!
[…] Wordpress Hide Dashboard plugin […]
Cool Wordpress plugin! I’ve been looking for this.
Julia
nice plugin. this saves me so much work.
Thank you so much! It’s people like you that make this world a better place… Well, at least an easier place for web developers. Thanks again!!!
Hi Patrick,
Thanks for Hide-Dash. I am using WP 2.5 and your plugin seems to function as advertised. I would like to extend it to also include hiding the subscriber’s “Help” and “Support” links in the dashboard header, as they simply direct subscribers to the wordpress site, not really help or support for my blog site. Seems like I just need a small snip of code, like the $Menu[??] for these, but I’m not completely certain. Any thoughts?
I could kiss you!
thanks alot
@onetechguy:
It looks to me like those links that appear at the upper-right of the 2.5 dashboard are hard-coded into admin-header.php and probably not removable via plugin.
Awesome !
Adding the following to your plugin after line 41 (if(!current_user_can(’level_10′)){) redirects any non-admin user off of any /wp-admin* page to /wp-admin/profile.php. This might, however, cause issues for mid-level users (i.e. authors/editors/etc may not be able to access needed functions) and I haven’t tested it thoroughly and there might be a better way to do this. YMMV.
if(strpos($_SERVER[’REQUEST_URI’],’/wp-admin’)!==FALSE
and strpos($_SERVER[’REQUEST_URI’],’/wp-admin/profile.php’)!==0){
wp_safe_redirect(’/wp-admin/profile.php’);
}
Thanks! Just what I needed
[…] http://www.deepwave.net/articles/hide_dashboard/ […]
Thanks! It works perfectly.
@iLG - So far, for editors/authors, they do not really have any problems with Hide Dashboard. This is because we do not modify the normal menu lines etc at all. So if without Hide Dashboard, and as an editor/author/subscriber/etc you still cannot see certain menu functions (like moderate comments and check spam), then that is a WP security issue. Maybe the user needs to be upgraded to Admin…
Anyhow, as of this moment, Hide Dashboard 1.1 has been tested and is working fine up to WordPress 2.6 Beta 2.
@Patrick — Hide Dashboard as you released it would have no problems for editors/authors/etc. My comment was that if one added the code I suggested, which blocks regular users from getting to the dashboard page even by direct URL, editors/authors might be affected (I only tested my modification with admin and subscriber accounts).
I made the modification to prevent non-admin from getting to the dashboard and anything else, even if they know the URL structure of /wp-admin/, since the site on which I use Hide Dashboard has some very smart and computer-literate folk who might try to access more than they should.
Hey ilg,
I added your code (cut/pasted) after that line, and I get an error: “Divide by zero” ?
[…] Version: 1.1 - License: GPL - Author: deepwave - Plugin Page - » Download […]
hi,i use this plugin in wp 2.5.1version1.1 . In “editor” the plugins work fine on removing the dashboard tab. but not redirecting the page to profile.php? can help
@Martin:
The first thing I’d check is that you got the quote marks correct, since there shouldn’t be any division or variable reassignment going on at all in my little snippet of code…
[…] to have users deposited on a page that has no relevance to them. This is where the Hide Dashboard plugin from Patrick/DeepWave comes in. It does a nice job of getting users to their profile page and […]
@Martin:
I looked again and I think it’s very likely to be the quotes, since if you copy/pasted what I posted in my comment here, the quotes were mangled by WP. I posted the snipped on my own blog, so it’d be syntax-highlighted and would copy correctly.
I’m using wordpress 2.6 and hide plugin 1.1
but even when hide plugin is activated
if i log with a level 0 user
the dashboard still appear..
any suggestion?
Patrick,
I see you’re using WP 2.3.3. This plugin does not work in WP 2.6. It doesn’t redirect them to the profile page and the dashboard has lots of info on it that I’d rather the users didn’t see. Please fix!