I can’t install WordPress on an existing database

Today I was trying to install a new copy of WordPress on my local machine. There was a working copy of a site in there that I accidentally deleted. So I tried to reinstall WordPress on that existing database. Everything was fine, but in the last stage of the installation a weird message was coming up. It was saying Please provide a valid username. and there wasn’t a field to provide a username, instead the text User(s) already exists. I have never come around this and neither have I heard of it. I am curious to know why WordPress is wanting a username when the field is locked. Is this a bug or something else?

Thanks in advance.

Related posts

Leave a Reply

2 comments

  1. I am adding this answer as this page comes up at the top of search engine results for “Please provide a valid username”

    If your WordPress installation is in a subfolder of an existing website…

    e.g. http://www.example.com/dev/

    The username will not be accepted if you have a .htaccess file at the root of the website.

    1. Rename the .htaccess file to something else.
    2. Continue with the WordPress installation.
    3. Then rename the .htaccess file back to what it was.
  2. I’ve faced it a few days ago, fixed it this way.

    1. At first exported (backup) old database.

    2. Installed a new copy of WordPress with a new empty database (settings should be using your old database username, password, etc).

    3. Imported the old database to new installation.

    4. Uploaded the uploads folder (images) to new installation.

    Problem solved, hope this helps!