WordPress.org

Ready to get started?Download WordPress

Forums

Changed access keys after a hack, and now no WP! (6 posts)

  1. OpenEars
    Member
    Posted 1 year ago #

    Hi,
    I recently saw some bogus posts on my wordpress site, so remained calm and visited http://codex.wordpress.org/FAQ_My_site_was_hacked. After changing my password, I still saw malicious activity so I changed the access keys according to the above site (using WP's automatic key generator).

    Once I changed the keys, overwriting wp-config, my wordpress site became unusable, and I get the message:
    Parse error: syntax error, unexpected $end in /home/content/10/9558610/html/wp-config.php on line 1

    Is there any way for me to get the site back? What could I have done by changing the access keys that would affect things in this way?

    Please help!

  2. Download a fresh copy of WP. Extract, and grab the wp-config.php file.

    Modify it to include your database credentials... and your new salt keys.

    When you changed the salt keys... you probably missed a line of code... or accidentally deleted a required line of code. PHP is intolerant... and if you make even the slightest mistake... it can break your site.

    So, download a new copy... modify file as explained above.. and then use either FTP or your hosts CPanel to copy it over, over-writing the one you are currently using.

  3. OpenEars
    Member
    Posted 1 year ago #

    Thanks for your response. I tried that just now: downloaded fresh copy of WP, grabbed the wp-config-sample file, renamed it to wp-config, added all the database name, username, and password stuff, then added the access keys, and uploaded it.

    Now, instead of the parsing error, I get a "Error establishing a database connection" message. Just to be sure, I went to my host and copied all the db information to make sure I had it right...I can log into phpMyAdmin with this, so I'm sure my database name, username, and pass are all correct.

    Could a malicious hack have caused all these problems? I have the sinking feeling I need to re-install completely....

    Thank you for your feedback!

  4. I would check your "localhost" value for your database information in your wp-config to make sure it is correct.

  5. OpenEars
    Member
    Posted 1 year ago #

    Thank you Josh, that was the issue! I had accidentally left the localhost info un-edited...
    Cheers!

  6. My pleasure. Glad you were able to get it working!

    (Please mark thread as resolved)

Topic Closed

This topic has been closed to new replies.

About this Topic