Skip to main content

Installing Wordpress and getting error not connecting to the database

Comments

6 comments

  • LostNerd
    You need to make sure your wp-config.php is correct. You should see something like this...
    /* MySQL settings */ define( 'DB_NAME', 'database_name_here' ); define( 'DB_USER', 'username_here' ); define( 'DB_PASSWORD', 'password_here' ); define( 'DB_HOST', 'localhost' ); define( 'DB_CHARSET', 'utf8' );
    It is imperative that you get this information right. Also, make sure you've assigned the MySQL user and Database to each other in cPanel.
    0
  • whipworks
    Is this before or after the install? Because I don't see that file? I do see, however, is a wp-config-sample.php.
    0
  • LostNerd
    After install. If you're getting the error during installation, try setting wp-config-sample.php CHMOD to 0777.
    0
  • 24x7ss
    yes, if wp-config.php file is not there then mv wp-config-sample.php to wp-config.php and try adding db name, db username and password. Once you set above field properly then your site will start working.
    0
  • whipworks
    ]yes, if wp-config.php file is not there then mv wp-config-sample.php to wp-config.php and try adding db name, db username and password. Once you set above field properly then your site will start working.

    Can I edit it via WHM instead?
    0
  • cPanelMichael
    ]Can I edit it via WHM instead?

    Hello :) No, WordPress configuration files are not modifiable via Web Host Manager. Do you experience the same issue when installing another instance of WordPress via the "Site Software" option in cPanel? Thank you.
    0

Please sign in to leave a comment.