Support » Fixing WordPress » Edited wp-config.php now can't login to dashboard

Viewing 12 replies - 1 through 12 (of 12 total)
  • Did you make a backup of the wp-config.php file before you edited it?

    I did not. Probably a big mistake on my part. All I did was add and subsequently delete the few lines of code though, could this still have changed other parts of the file?

    Try checking your site’s error logs for messages. Your hosts should be able to help you in accessing your site’s error logs.

    Did you ask your host if they have backups of your site (the good ones usualy make backups) so that they could restore it?

    I don’t believe we have a host (I think we host our own website?) Can I find anything helpful in the FTP or is there anyway to access the log?

    I found this file- class-wp-error.php -which I thought might be helpful and think might help record errors, but looked through it and it didn’t list anything specific.

    If this is your own server, talk to your server admin(s).

    I honestly am not sure who our admin(s) are, could be me at the moment. Would disabling widgets maybe help? Or am I about to just keep digging a deeper hole.

    Why after I resaved the file how it used to be would the error still occur though?

    Thank you everyone for the responses so far, and sorry for my lack of knowing anything hahahah.

    This has nothing to do with widgets.

    Yeah I thought that was a shot in the dark. Does anyone see a way to solve this problem? Heck at this point I wouldn’t mind even just getting it back to being able to login to the dashboard and not worry about fixing theme/install problems

    Would sharing my wp-config.php file help? This is the only thing I touched so I figure this must be the root of the problem somehow.

    Could anyone try to help me out again? I really need to just unlock the dashboard before I leave for vacation tomorrow hahahah.

    Would it make sense to download/create a new wp-config.php? By editing my wp-config.php in the first place could it have changed anything and other files like the wp-login or admin.

    Please help im desperate!! I feel like this should be a quick fix but it has been killin me for days.

    Moderator Jan Dembowski


    Brute Squad and Volunteer Moderator

    I’m deleting that other topic you’ve started, duplicate topics are Not Good™.

    From my now deleted reply:

    If it’s only the wp-config.php file that you’ve changed then try the following:

    – Make a backup copy of your existing wp-config.php file. Actually backing up the whole works may not be a bad idea.

    – Rename that existing wp-config.php file to something like wp-config-not-working.php

    – Copy the wp-config-sample.php to wp-config.php. Make sure you renamed the old file first, you don’t want to lose that file.

    – Using just the most plain jane text editor locate and set these values for your installation. Notepad or Notepad++ is good for this. You can get these values from your old copy.

    define( 'DB_NAME', 'database_name_here' );
    define( 'DB_USER', 'username_here' );
    define( 'DB_PASSWORD', 'password_here' );
    define( 'DB_HOST', 'your_db_host_here' );

    – Clear your browser’s cache and cookies and try to re-login again.

    Hi…please, I need advice to solve my problem:

    …I guess I screwed wp-config file by adding two lines of code at the beginning (i did this because I couldn´t login to wp admin) and added these two lines:


    I don´t know if I made a mistake but now I have no access to anything…FTP can’t´connect and CPanel doesn´t open….
    I have the backup wp config but I can’t´upload it if I can´t access the files….please, help.

    Is there any possibility to

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Edited wp-config.php now can't login to dashboard’ is closed to new replies.