0

i have an old blog that was made by a guy.
Now i'm trying to learn wordpress so i made my own blog, with different theme and template.

I asked my friend to send me a copy of the database of the old blog, so i'll be able to have all my old posts on my new blog.

How can i do that?

I uploaded the database but when i do that it asks me the Admin account of the old blog... but i don't have them and my friend is abroad and he can't help me as of now.

Where do i do wrong? did he do something wrong when he saved the db? Should i change lines in the db file so i will remove the old password?

1

I'm assuming you have an sql file that you're uploading?

If so, open that file in a text editor such as Notepad. Search for 'user_login', and somewhere nearby that you should see something similar to 'INSERT INTO wp_users (ID,user_login' etc. On the next line after this, you should see something like (1, 'admin', 'password' where 'admin' is the admin username, and 'password' is the hashed password.

You can't login directly with that hashed password. But what you can do here is change the e-mail address listed on that line to one that you can access, then save the file.

Upload it into your Wordpress install again, and this time follow the forgot password link. Enter that e-mail address you put in, and you should be able to reset the password!

Alternatively, you can use an MD5 generator like http://www.miraclesalad.com/webtools/md5.php, enter a new password there and copy the hash to replace the existing password in the SQL file. That will also let you log in with the new password.

Hope that helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.