-
Author
-
December 27, 2016 at 03:58 #148024RoaderParticipant
Hi there!
Im trying to protect wp-login and wp-admin using for example (in .htaccess):
ErrorDocument 401 “Unauthorized Access”
ErrorDocument 403 “Forbidden”
<FilesMatch “wp-login.php”>
AuthName “Authorized Only”
AuthType Basic
AuthUserFile /home/myuser/public_html/.mysecretpass
require valid-user
</FilesMatch>
But, I have a problem. When you click on LOG OUT, the Confirmation Windows appears.
I dont want that!
I saw that SweetDate Theme has wp-login protected ===>
WPDOCTOR Test Link For SweetDate
So, what do you do for protect correctly… without problem for User’s LOGOUT ??
Attachments:
You must be logged in to view attached files.December 27, 2016 at 04:18 #148027RoaderParticipantOther think:
How can I to restringe the access to dashboard? For example, if a suscriptor write:
mysite.com/wp-admin He or She can in to WP DashBoard. I dont want that.
I did try with:
COPY CODE//Acceso prohibido a Dashboard de suscriptores function restrict_access_admin_panel(){ global $current_user; get_currentuserinfo(); if ($current_user->user_level < 4) { wp_redirect( get_bloginfo('url') ); exit; } } add_action('admin_init', 'restrict_access_admin_panel', 1);
But, with this code an error:
When a User fails with the LogIn, he is redirect to: wp-login.php
I dont want that.
Attachments:
You must be logged in to view attached files.December 27, 2016 at 04:33 #148030RoaderParticipantCOPY CODE// Limit WP Dashboard Access add_action( 'init', 'blockusers_init' ); function blockusers_init() { if ( is_admin() && !current_user_can( 'administrator' ) && !( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { wp_redirect( home_url() );exit; } }
Okey, this code works, but, I need to add access for Shop manager, but, I dont know how
December 28, 2016 at 00:36 #148139LauraModeratorHello, will assign the ticket to a higher support level who can help and advise you in your query.
Thanks! ?Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
December 28, 2016 at 01:01 #148143RoaderParticipantGracias Laura.
Pues sí, yo veo que el Demo tiene protegido el wp-login, y no hay problema cuando le das a LogOut, sin embargo a mí me pasa que me pide ingresar nombre y clave para Salir.
Por tanto, me gustaría ver de qué manera uds protegieron el wp-login de manera funcional.December 28, 2016 at 15:40 #148205RaduModeratorHi,
Those things aren’t related to the sweetdate theme. My opinion it’s to redirect somewhere else on log out http://stackoverflow.com/a/26870337
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionDecember 28, 2016 at 21:48 #148240RoaderParticipantMy friend Radu. I can see that the Theme SweetDate has the Wp-Login Protected.
How do you that?
December 28, 2016 at 22:48 #148249RoaderParticipantAnd Radu. I saw the link, but, I dont understand what I can do with:
I saw header.php, but, this file has an especific code… So, please, Help me!
I need to protect Wp-admin and Wp-login (without plugin)… But, the problem is when a User click on LogOut…
January 3, 2017 at 18:15 #148593RaduModeratorHi,
I don’t have a plug and play solution for this and I recommend you to use a plugin that does this already.
And I’ve told you can use the function and action from this link : http://stackoverflow.com/questions/26870082/log-out-wordpress-and-redirect-to-different-url/26870337#26870337
note: I haven’t tested the code!
R.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJanuary 3, 2017 at 23:29 #148630RoaderParticipantHi Radu. Please, Test it and tell me!
And please. NOT MORE PLUGINS! Right Now I have a big problem with a Plugin.
Do you know the bug Full Path Disclosure?? Hehhe a Big problem. For me and you!
Check your plugins! For example. WP Super Cache!
With more supplements, the more insecure is WP! But, you know that! 🙂
For this reason, I PREFER SECURE AND STANDARD PHP CODE!
January 4, 2017 at 18:12 #148738RaduModeratorHi,
We don’t have a plug and ply code for that, please understand, you can use this plugin: https://wordpress.org/plugins/remove-dashboard-access-for-non-admins/
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
You must be logged in to reply to this topic.