Jump to content

Wordpress Error - Can’t Select Database


Recommended Posts

So I've searched the forums and haven't found the answer for this yet and have also checked the wordpress forums, so I'm not just asking without doing research. But after setting up a database as described here: http://www.totalchoicehosting.com/help/wordpress.html I cannot get my blog to display at all.

 

If I do assign a user to the database I get this error:

 

Warning: main(/home/cpanelname/public_html/blog/wp-includes/cache.php) [function.main]: failed to open stream: No such file or directory in /home/cpanelname/public_html/blog/wp-settings.php on line 128

 

Warning: main(/home/cpanelname/public_html/blog/wp-includes/cache.php) [function.main]: failed to open stream: No such file or directory in /home/cpanelname/public_html/blog/wp-settings.php on line 128

 

Fatal error: main() [function.require]: Failed opening required '/home/cpanelname/public_html/blog/wp-includes/cache.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cpanelname/public_html/blog/wp-settings.php on line 128

 

Currently this is the error I am receiving [without any users in the database]: http://www.djevs.com/blog/

 

I've already modified the wp-config.php file with this:

 

define('DB_NAME', 'cpanelname_databasename'); // The name of the database

define('DB_USER', 'cpanelname_databaseusername'); // Your MySQL username

define('DB_PASSWORD', '********'); // ...and password

define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

define('DB_CHARSET', 'utf8');

define('DB_COLLATE', '');

 

 

Any tips would be greatly appreciated.

Edited by TCH-Thomas
Edited out sensitive information
Link to post
Share on other sites

Is this a new install of Wordpress?

 

Did you install this manually? Or through Fantastico?

 

If you installed with Fantastico it would have created a database for you and created a user to access the database.

 

If you install manually, you need to create a database, create a user and add the user to the database.

 

Detailed Installation Instructions

Link to post
Share on other sites

This is a fresh install due to my last version of WP not allowing me to delete posts, which I tried everything to resolve that and no luck, so I figured a re-install would fix it.

 

I installed this manually, I went into my cpanel and created a database, however after I created a user and then added them to the database is when I get the weird error stated above. If I don't add a user it gives me this: http://www.djevs.com/blog/

Link to post
Share on other sites

Yes that is why I am confused as I have checked over and over and all of the info is correct. I'll even set up a new database and create a new user and still get the same errors.

 

In the wp-config.php file I've even put djevscm_ before the name of the database and MySQL username and still get the same errors.

Link to post
Share on other sites

Since it's a new installation why not delete the databases and users you have created? Delete the Wordpress files and use the installer within Fantastico to install a new copy.

 

Or else you will have to open a help desk ticket and ask the techs for some assistance getting what you have working.

Link to post
Share on other sites
If I do assign a user to the database I get this error:

 

Warning: main(/home/cpanelname/public_html/blog/wp-includes/cache.php) [function.main]: failed to open stream: No such file or directory in /home/cpanelname/public_html/blog/wp-settings.php on line 128

 

It appears you had the database portion working (you *should* have the user assigned to the database). But when you did it failed because you are missing the cache.php file in your installation. Check your installation because it appears at least one file failed to get installed properly (cache.php in the wp-includes directory).

Link to post
Share on other sites
It appears you had the database portion working (you *should* have the user assigned to the database). But when you did it failed because you are missing the cache.php file in your installation. Check your installation because it appears at least one file failed to get installed properly (cache.php in the wp-includes directory).

 

Ah ok, yeah I kept losing connection when uploading the files and when checking to see if all of them made it I guess I overlooked that one. Thanks for the help guys!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...