• Resolved euro11

    (@euro11)


    I’m using a plugin to rename and block access to wp-admin. there is no other way to use Adminer unless I unblock wp-admin temporarily.

    So is there any specific rule that I can use in .htaccess so that I can force Adminer to use the new wp-admin path instead ?

    Or is it possible for you to put a new feature in your plugin for that matter in case wp-admin is blocked and redirected to a new path ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Pexle Chris

    (@pexlechris)

    try to add define(‘PEXLECHRIS_ADMINER_SLUG’, ‘something’); in your wp-config.php

    • This reply was modified 1 year, 5 months ago by Pexle Chris. Reason: typo fix
    Thread Starter euro11

    (@euro11)

    Wow. that was so quick Chris. thanks for your response.

    Well I’d rather not edit wp-config.php. if it’s not possible through .htaccess file, it would have been great if you could add it as a new feature to your plugin in the future.

    Plugin Author Pexle Chris

    (@pexlechris)

    The /wp-adminer slug should be ok with every wp installation! But some plugins, don’t respect this and override all the URLs that starts with wp-admin. This is why I have added a choice to change adminer slug with this php constant! The edit of wp-config.php file is safe because this file is not affected by core upgrades. In addition, I think that you can add this constant with a plugin such Code Snippets…

    Thread Starter euro11

    (@euro11)

    I tried the given code in wp-config.php and it worked perfectly. thanks Chris.

    It would be even better if I could add it to Code Snippets as I change wp-admin directory from time to time and it makes it a little bit harder for me to log into cpanel and make changes to wp-config.php. two final questions:

    1. Is it enough to add the following line in Code Snippets ? shouldn’t it be defined as a function or something ?
    define(‘PEXLECHRIS_ADMINER_SLUG’, ‘new_admin_directory’);

    2. Which one is safer ? wp-config.php or Code Snippets ?

    Plugin Author Pexle Chris

    (@pexlechris)

    You can use Code Snippets, yes. But if you can avoid using Code Snippets I recommend to avoid using it!

    The code is the following:

    define('PEXLECHRIS_ADMINER_SLUG', 'new_admin_directory');
    

    Have in mind that when you change wp-admin URL, you do not need to change Adminer Slug!

    The conflict is because default slug wp-adminer starts with wp-admin.

    Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adminer stops working when I rename wp-admin’ is closed to new replies.