Loading...

Knowledge Base

Powered By Network Solutions: WordPress - How to Update Database Connection Strings

Your WordPress website must be connected to a database to function. This guide provides the full process to update database connection strings if you need to connect your WordPress site to a different database.

This guide, organized into collapsible sections, will walk you through these important update connection strings processes.


Access Hosting

  1. Log in to your Network Solutions® Account Manager via https://www.networksolutions.com/my-account/login.
  2. From the left-hand menu, click the Hosting tab.
    Hosting Left Navigation tab
  3. Depending on the number of Hosting packages in your account, the Hosting section's interface may look slightly different. Full descriptions of each feature are discussed below. 
     
    • If you only have one Hosting package, you will be taken directly to the Hosting Summary page.
      Hosting Summary Page
       
    • If you have multiple Hosting packages, click the Manage button on the package you need to modify.

Step 1: Get Your New Database Information

Before you can update database connection strings, you need the correct name, username, and password for the new database.

Provided that you have accessed the Hosting page, please follow the steps below to get your new database information.

  1. Please navigate to your new database based on your account's creation date.
    1. Click MySQL Management in the left-hand menu.

      MySQL Management

    2. Locate the database you need to manage, then click its Manage link on the right.

      Manage database button

    3. Take note of the database name and username. You can also change the password by clicking the Change Password option.
    1. Click Database Manager under Configurations.

      Configurations - Database Manager

    2. Look for your new database and click the database name.

      Database name in list

    3. Take note of the database name and username. You can also change its password if you no longer remember it.

      Database name & username details

Step 2: Update Your wp-config.php File

The final step is to edit the `wp-config.php` file to use the new information.

Provided that you have accessed the Hosting page, please follow the steps below to update your wp-config.php file.

  1. Access your site's files via File Manager or FTP.
    1. Click File Manager on the left-hand menu.

      File Manager option

    2. Click your site's folder (directory). For this example, we'll use the `public_html` folder.
    1. Take note of your FTP information under the Hosting Information section on the right.

      FTP Information panel

    2. Use an FTP client to connect to your server. Visit the Powered By Network Solutions: How to Connect Using an FTP Client article for instructions.
    3. Navigate to your site's folder (directory), typically `public_html`.
  2. Within your site's main folder, locate the `wp-config.php` file, click the three-dot menu on the right, and select Edit.

    wp-config.php file - Edit option

  3. Locate the following lines of code that contain the database connection strings:
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'database_name');
    
    /** MySQL database username */
    define('DB_USER', 'database_username');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'DatabasePassword');
    
    /** MySQL hostname */
    define('DB_HOST', 'localhost');
    
  4. Replace the values for `DB_NAME`, `DB_USER`, and `DB_PASSWORD` with the information you noted in Step 1.
  5. Click the Save button to finalize your changes. Your effort to update database connection strings is now complete.
  6. Relaunch and check your website in a browser to ensure it loads correctly.

Review

This guide has walked you through the complete process of updating database connection strings for your WordPress website. You learned how to locate your new database details and how to edit the `wp-config.php` file with the correct information. Keeping these strings accurate is essential for maintaining your site's connection to its database.

Did you find this article helpful?

 
* Your feedback is too short

Loading...