Hiding the admin username and urls (4 posts)

  1. MC
    Posted 3 years ago #

    Initially, when trying to secure some of my WP sites, I would change the admin user name. I stopped doing so when I saw that it will display this in the meta area near each post. I am pretty sure I can handle removing that part in my child theme.
    (edit - searching for the string 'the_author_meta' seems be finding the places in my theme I want to override here)

    However, I just found this url when reviewing the index of my domain:

    I would like to remove all possible means of discovering of the admin username. Here are my questions:

    Is there anywhere else I am missing where you can figure out the sites "admin" username?

    What is the best way to stop WP from resolving any of the /author/ urls ?

  2. phe.le
    Posted 3 years ago #

    I would do three of the following:

    1. Edit the template to not display the admin username and url.

    2. Use robots.txt to hide the admin page from search engines.

    User-agent: *
    Disallow: /author/admin/

    3. Redirect that admin page to another page such as homepage.

  3. Zoee
    Posted 3 years ago #

    You should be able to change your display name in your user profile. You can set this to something other than your username and then the display name should be what shows on your blog.

  4. MC
    Posted 3 years ago #

    1. Edit the template to not display the admin username and url.

    I did this by trimming out an if statement in the <footer> of my content.php file. This is what I put in my child theme:

    <footer class="entry-meta">
    <?php twentytwelve_entry_meta(); ?>
    <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
    </footer><!-- .entry-meta -->

    I am going to work on implementing suggestions 2 & 3.

Topic Closed

This topic has been closed to new replies.

About this Topic