PDA

View Full Version : Word Press Issue with 4.0



Dking
05-19-2010, 10:13 PM
I finally made the move from 3.0 to 4.0 while everything looks great, I'm not seeing my wordpress blog. I get this when I bring up the page:

"Error establishing a database connection

This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost. This could mean your host's database server is down.

* Are you sure you have the correct username and password?
* Are you sure that you have typed the correct hostname?
* Are you sure that the database server is running?"

Username and password are fine.

I copied everything in 3.0 /var/www/html to 4.0 public_html. Nothing more. Nothing less.

Does wordpress need to be located somewhere else? Installed on 4.0? What am I missing.

wildjokerdesign
05-20-2010, 08:33 AM
You need to transfer the database itself and then make some adjustments to the configuration file. Hopefully you still have your 3.0 account active so you can get to the database. The easiest way to do this is to install phpMyAdmin on your 3.0 account if you have not already and then log into it and export the tables in the wordpress database. Click on the database so that you see the tables in it. Then click the Export tab. Once you have that sql file dowloaded to your local computer you can then transfer it to your new 4.0 account. It might be you have an export feature in your Wordpress Admin. That may be easier for you to use then phpMyAdmin.

There are some diffrences with a 4.0 account when it comes to databases. Both your database and usernames are actually prepended with the username for your account. You'll need to create the user and database that is used for wordpress via cPanel. Log in and go to "My SQL Database Wizard". There should be an icon for this in the top left box when you log in, or you can scroll down to the Databases section on the right and find it. Follow the steps presented to you for createing the database and user. At the end it ask for Privileges and you want to give the user all privileges on this database. Take not of the information it gives you. You'll notice that it is prepending the stuff you enter with your username for the account.

Now that you have a database set up you can log in via phpMyAdmin in your 4.0 account to import your database. phpMyAdmin is already installed in 4.0 accounts and is located under Databases in the same location as the Wizard. You should be able to select the database you created and then import the tables and data the you saved.

Last step is to edit the configuration file for wordpress. If you did not change it then it is still has the old database name, usename and password. You did write all that down when you created it right? :) I think the correct file is wp-config.php. If I recall correct the database defines are right at the top of that file. Make the changes and save. You should be good to go.

If you need any more help or clarification let me know. For me the process is pretty easy but I know that for others it can be a challenge. I hope I have explained it well enough.

wildjokerdesign
05-20-2010, 10:53 AM
I went ahead and wrote up a Q&A page on this subject on my site. http://wildjokerdesign.net/faq/how-do-i-move-my-30-database-my-40-account It may be a bit more detailed for you. Also once I have time I want to add some screen shots to it. I figured this subject would keep coming up so thought it would be good to have a permanent reference. :) The abobve is a new site I am working on so please excuse any mess you may see.

Dking
05-24-2010, 11:08 AM
Excellent.
Thank you so much for your help.