Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress Reply To: WordPress Install Issues

Discussion in 'Misc WordPress Requests' started by Sharvin Shah, Mar 7, 2018.

  1. Sharvin Shah


    Reply To: WordPress Install Issues, by Sharvin Shah

    As the above step didn’t work or didn’t apply to you, then the next thing you can do is take a look at your database settings in your wp-config file.You’ll see the login credentials for your database, probably near the top of the file. It should look something like this:

    // ** 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’ );

    If anyone of these values is incorrect, WordPress will not be able to connect to the database.One way to check your database outside of WordPress is by using PHPMyAdmin, a tool for accessing and editing MySQL databases. PHPMyAdmin is included with most hosting plans, and you can find it in your cPanel dashboard.
    Just be very careful using PHPMyAdmin, since you’ll be dealing directly with your site’s database. Once you’ve logged in to PHPMyAdmin, you will see a list of databases on your server in the left-hand column. Click on the one that matches the name in your wp-config file (it will be the value after DB_NAME, where it says “database_name_here” in the above sample code).Don’t see any databases? Contact your hosting company, since the entire problem may be an issue with your server.

    You can also try out this options:
    Option 1: Test your existing credentials.
    Create a file in your WordPress directory called something like testconnection.php (the name doesn’t matter; just the .php extension). Paste the following code:
    $test Connection = mysql_connect(‘localhost’, ‘root’, ‘password’);
    if (!$testConnection) {
    die(‘Error: ‘ . mysql_error());
    echo ‘Database connection working!’;
    Once you’ve created that file, just navigate to the URL of the file in your browser (e.g. your site.com/testconnection.php). You’ll see either a successful connection message, or an error with more details.
    If the username and password aren’t working, you can just create a new one.

    Option 2: Create a new database user and password.
    We can do that using a different tool available in cPanel called “MySQL® Databases.” Go ahead and click on that, then scroll down to the heading: MySQL Users: Add New User.” Choose a username and strong password, and make note of them for your wp-config file. Click “Create User.” Now scroll down to the heading “Add User To Database,” and choose your new username and your WordPress database, and click “Add.” Update your wp-config file with the new username and password.
    Now your database name, username, and password are all correct. That just leaves DB_HOST.
    In most cases, this value will be “localhost,” but it depends on your host’s settings. WordPress has a list of common hosts with their DB_HOST values on their website. If your host isn’t listed there, you can contact your hosting company to ask what value to use.

    3. Still getting the error message? Check with your hosting company
    If you’ve followed the above troubleshooting steps and your website is still down, it could be a problem on your host’s end. Contact your web hosting company’s support and give them all the details of the error and the troubleshooting actions you’ve taken, and they may be able to help you determine the cause of the error.
    Good Luck! I hope this helps you

    Reply To: WordPress Install Issues

Share This Page

Monarch Social Sharing Plugin