I have accidentally messed with wp-config.php file and now nothign works…

I was attempting to fix an error with the installation of my domain mapping plugin but was only successful in having moved or deleted a necessary component of the wp-config.php file. Wp is prompting me to do word things and I 'm not sure what needs to be moved back to where without causing further damaged. Screen shots attached of what I am currently seeing from wp and also in my bluehost file manager account.

Please help!

Peyton

  • Vaughan
    • Ex Staff

    Hi william,

    Hope you’re well?

    If you deleted the wp.config you will need tocreate it again.

    copy & rename the wp-config-sample.php

    rename it to wp-config.php

    Now edit the file, you’ll need to re-enter your DBuser/pass/host etc

    then generate the Salt Keys (it gives you a link to use in the comments of the config file for that)

    Then you can add the multisite code in the file too.

    /* Multisite Stuff */
    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    define('DOMAIN_CURRENT_SITE', 'yourdomain.com');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    /* Domain Mapping */
    define('SUNRISE', 'on');

    Don’t forget to change the domain above to your domain.

    Hopefully that should then get you going.

    Hope this helps

  • Vaughan
    • Ex Staff

    Hi,

    It looks like the db localhost is incorrectly set in wp-config.php

    Can you send your details using the following contact form (select i have a different question from the dropdown.)

    https://wpmudev.com/contact/

    Mark for attn: Vaughan

    Include a ref URL to this thread.

    Please include the following details;

    – Site login details (super-admin if on multisite)

    – FTP login details so I can take a look at the theme/plugin files.

    – CPanel access in case I need to check the DB.

    Thanks