0

I have a Wordpress website and it's fully functional in offline mode(localhost), but we need to transfer it now to another computer.

My problem is the username and password used in that Wordpress installation that I've created during the installation, how can I change it now?

What file should I edit, to properly connect to the database again?

5
  • 4
    wp-config.php Commented Jan 4, 2017 at 6:45
  • Thank you for the -1 and your answer. Being newbie is not that easy .. Commented Jan 4, 2017 at 6:46
  • 2
    It would take 3 seconds to search on google and understand what is the configuration file and how to modify it instead of asking here Commented Jan 4, 2017 at 6:57
  • Would you please refer this link codex.wordpress.org/Moving_WordPress ? I think it's helpful for you. Commented Jan 4, 2017 at 7:12
  • I think this would anyways fit better to either DBA or Superuser as this has nothing to do with programming, does it? Commented Jan 4, 2017 at 8:13

2 Answers 2

1

Change your admin password using phpMyAdmin

You will look for the table wp_users, click on it and then click on the Browse Tab.

enter image description here

Click on the Pencil (Edit) Icon to reset your Password.

enter image description here

Now you will see a field that looks like this:

enter image description here

Edit the user_pass field value. You will notice that there are a lot of random characters in the password field. Due to security reasons, WordPress stores the passwords as MD5 Hash rather than Plain text.

This means that you will not be able to enter plain text as the password. You would need to use one of the MD5 generators online to generate your password.

Settings in wp-config.php File

Your WordPress database connection settings appear under ‘MySQL Settings’ section of the wp-config.php file. You will need your MySQL host, database name, database username and password to fill in this section.

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'database_name_here');

/** MySQL database username */
define('DB_USER', 'username_here');

/** MySQL database password */
define('DB_PASSWORD', 'password_here');

/** MySQL hostname */
define('DB_HOST', 'localhost');
Sign up to request clarification or add additional context in comments.

Comments

0

Follow the following step to do it..

  1. Export the database
  2. Copy full project
  3. In another computer open localhost PHPMyadmin
  4. Create new database(name as per you want) Import the database
  5. Past project in wamp/www directory
  6. open wp-config.php file and change attribute like DB_NAME=(As per you mention at a time of import database) , WP_USER=root, WP_PASSWORD= ""
  7. And your project will live

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.