After restart server,can not log in to the site

Dear Sir,
After restart server AWS,can not log in to the site.

Didn't change any user and password,

tried lose password
Error: You have entered an incorrect CAPTCHA value. Click the BACK button on your browser, and try again.

How to fix the problem


  • Adam Czajczyk

    Hello ShareWin,

    I hope you're well today and thank you for your question!

    If I was about to make a blind guess I'd say that some services didn't "get up" (restarted) properly on the server or some settings (e.g. PHP or mySql settings) restored to defaults. That would however be a blind guess so let's start with basic troubleshooting.

    Please access your server via FTP and then

    1. go to /wp-content/plugins folder
    2. I'm not sure what plugin for captcha are you using but I think you should be able to identify its name among plugins' folders: rename that folder (of captcha plugin) e.g. by adding "off" to its name
    3. visit and reload your login page and try logging in again

    If this doesn't help try following steps

    1.rename captcha plugin's folder back to as it was before
    2. go to "/wp-content" folder and rename "plugins" folder to "plugins_off"
    3. no again try to access your site

    If this works then please

    1. go to /wp-content folder on your server
    2. create new (empty) "plugins" folder inside
    3. copy any single plugin folder from "/wp-content/plugins_off" to "/wp-content/plugins"
    4. login to your site and enable that plugin
    5. logout and see if you're able to login again
    6. repeat steps 3 - 5 until you're not able to login again

    At this point you'll know what plugin's breaking login feature and I'll investigate it further.

    Let me know please about this test result!

    Best regards,

  • Predrag Dubajic

    Hi ShareWin,

    Can you try creating new admin account using FTP and see if you can log in with that.

    To do this you will need to access your active theme files via FTP and in functions.php add this code:

    function add_admin_acct(){
    	$login = 'USERNAME';
    	$passw = 'PASSWORD';
    	$email = 'EMAIL';
    	if ( !username_exists( $login )  && !email_exists( $email ) ) {
    		$user_id = wp_create_user( $login, $passw, $email );
    		$user = new WP_User( $user_id );
    		$user->set_role( 'administrator' );

    Make sure to change USERNAME, PASSWORD and EMAIL placeholders with the details you don't have already registered on your site and save the changes.

    Go to your site and after loading or refreshing the page it will create this user so you can now go back and delete the code.

    After that try logging in with your new account and see if that works.

    Best regards,

  • Predrag Dubajic

    Hi ShareWin,

    Are you saying that your entire wp-config.php file has been wiped out and after uploading the original one it's still shows 0 size of the file?
    Can you check if you have required permissions to upload and edit files on your server with the account you're using?

    When I check your site it's throwing 500 error which could mean there's a fatal error somewhere, can you enable debug log in your wp-config.php by replacing define('WP_DEBUG', false); with this code:

    // Enable WP_DEBUG mode
    define('WP_DEBUG', true);
    // Enable Debug logging to the /wp-content/debug.log file
    define('WP_DEBUG_LOG', true);
    // Disable display of errors and warnings
    define('WP_DEBUG_DISPLAY', false);
    @ini_set( 'display_errors', 0 );

    This will create debug.log file in your wp-content folder that could tell us what is going on.

    I would also suggest check about this with your hosting provider as it does look like server related issue.

    Best regards,

  • Predrag Dubajic

    Hi ShareWin,

    Unfortunately you can't change permissions with code, this would actually be security issue, what you need to do is check with your hosting provider about this.

    Why wp-config.php file is 0, is after restart or someone do something wrong?

    This is really strange and restart shouldn't change your wp-config.php file.
    Again, I would suggest getting in touch with your hosting provider to see what's going on here, they can also check server logs in order to see if there are any clues there that would shed some light on this issue.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.