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.
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:
- 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 ?
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