WordPress.org

Forums

[resolved] Permalinks switched to display my username in url for posts and pages (10 posts)

  1. maryefern
    Member
    Posted 1 year ago #

    I can't figure out why all of a sudden my permalinks are not working the way I want them to... Under my settings, I have selected "month and name", however, when I go to edit a post or page, or to create a new post or page, the permalink is automatically set to display my username (e.g. "admin") in the url! This is really disturbing because it is putting my username at risk and it is also incredibly annoying because every time I edit something I have to manually edit the permalink to get it back to the way it was. I have tried disabling ALL plugins, but this did not help.

  2. What's in your .htacess file?

  3. Aaron
    Member
    Posted 1 year ago #

    Also what does it look like when you are logged off like a normal visitor would see it?

  4. maryefern
    Member
    Posted 1 year ago #

    Thank you both for your replies! It seems I don't have an .htaccess file. Weird, because I thought I used to have one... When I log off my user, the pages with this permalink with my username attached to it look exactly the same.

  5. Aaron
    Member
    Posted 1 year ago #

    Create a file called .htaccess in the root folder and use the below contents. If you can't figure out how (sometimes not very easy since the name is odd) just download WP again and take the .htaccess out of the archive and upload it.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
  6. maryefern
    Member
    Posted 1 year ago #

    Thanks Aaron! I now have a .htaccess file with the code above but, unfortunately, it didn't work. Any other ideas?

    P.S. I also tried deleting the .htaccess file, setting the permalinks to default, and then setting them back to "month and name". Still no go.

  7. maryefern
    Member
    Posted 1 year ago #

    HELP, this problem is still not solved! Any other ideas for me?

    Thanks!

  8. Aaron
    Member
    Posted 1 year ago #

    Have you tried swapping to the default theme and seeing what you have?

  9. maryefern
    Member
    Posted 1 year ago #

    Hey Aaron, thank you so much for the reply. This is so weird but the problem just went away! I didn't even have to do anything! I am really stumped as to why this happened, but just so glad it is working now. Thanks for all your help. :-)

  10. stephhunter9
    Member
    Posted 1 year ago #

    I'm just going to leave this reply in case anyone in the future, like me, came across this same baffling problem. The solution was horribly simple yet hard to pinpoint at first.

    For me, I had the same symptoms as above - editing a page or post caused the permalink to change to my username... completely baffling. I tried all sorts of forums/fixes until I tried another browser. The new browser wasn't affected! So I looked further... it turned out to be my freaking password manager extension entering my username into the hidden permalink field without me seeing it and thus updating the permalink to my username for that website EVERY time I updated a page. Painful!

    The culprit for me specifically was the "PasswordBox" Chrome extension.

Topic Closed

This topic has been closed to new replies.

About this Topic