Users can register as contributor to my wordpress website. But the registered users can go to www.website.com/wp-admin and login and get to admin page. I know they have very less capabilities but still i want to redirect them to the index page or someother page in the site.
Is there a way to do it?
Leave a Reply
You must be logged in to post a comment.
put the following code somewhere wordpress will execute it.
but don’t try and goto /wp-admin to login, goto /wp-login instead
yes just set the permission levels up in the WP admin. Go to admin, then into users and make sure their permissions are subscriber, not admin or editor or author.
You can do this by editing your .htaccess file. This is in the root folder.
I have included something from http://www.catswhocode.com/blog/10-awesome-htaccess-hacks-for-wordpress that explains this better:
Allow only your IP adress on the wp-admin directory
Excepted the case of a collaborative blog, only you should be allowed to visit the wp-admin directory. If you have a static IP, this code will do the job.
All you have to do is to enter your static IP adress on line 8. Note that you can add more IPs if needed, by creating a new line with: allow from xx.xx.xxx.xx inside.
Source: Protecting the WordPress wp-admin folder