• Hi,

    I have taken over a site for a client who can not login to the admin panel resulting in this error message:

    [ERROR: Cookies are blocked due to unexpected output. For help, please see this documentation or try the support forums.]

    In my research to find a solution, many have suggested updating WP core files, which needs to be done, but I’d like to save myself a lot of headache by not breaking the entire site if possible.

    My question is what is the best way to update the core files so I can login and update the plugins and theme without breaking the site? Which is currently functioning fine, I just can’t access the dashboard for updates, etc.

    The site is currently running on 4.2.10

    Any suggestions are greatly appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello, ChicagoHealthOnline, & welcome. Actually, I think the best thing to do is to disable plugins, start w/a default theme, if possible, & go from there. You can do that via FTP, i.e., rename the plugins folder by appending a 1 or a .old to the end of the name. Same applies to the theme folder. I wouldn’t be terribly surprised, though, given how out-of-date this site is, if it hasn’t been compromised.

    Thread Starter ChicagoHealthOnline

    (@chicagohealthonline)

    Hi Jackie,

    Thank you for the insights. I will start with the plugin folders and go from there. I am pretty sure the site has been compromised, and am trying to find a solution that causes the least amount of damage.

    If I switch to a default theme, and update, then switch back to the custom theme won’t it cause the same issues?

    Hello, ChicagoHealthOnline. Your first order of business is to repair the compromise & ensure all means of illegitimate entry into the site have been closed off. From there you can start your reconstructive work on the site. Most people place a great deal of emphasis on repairing the damage, but until you ensure that the site’s been locked down to only legitimate users, any work you do repairing the site itself will be for naught, as the criminals will gain entrance fairly quickly & ruin everything. This is what I tell folks who’ve been hacked–perhaps you’ll also find it helpful.

    A resource you can go to is:
    http://codex.ww.wp.xz.cn/FAQ_My_site_was_hacked

    When dealing w/a site compromise, the objectives are twofold:
    1) Fix the site; &
    2) Fix backdoors that the hacker used to gain entrance into your site, so this hopefully will not happen again.

    Most people place great emphasis on objective #1, but, in truth, the 2nd one is actually the most important, as, without it, your site will continue to be reinfected.

    Here are the steps to take.

    First, notify your host, as this might be a serverside hack as opposed to simply a site compromise. Also, if you’re on shared hosting, the hack has the potential to compromise the entire server. Additionally, you may wish to take the site offline, & your host can help you do this. They might not help you–then again, they might. You won’t know unless you notify them. If they say it’s not their responsibility, (& it really may not be), then please continue reading.

    Second, scan any devices you will use to log onto your website for malware. It does no good to change credentials, etc., which you will need to do, if malware phones them home to their command & control center. It’s actually better to do more than 1 scan, each using a different program, as no single malware scanner can detect everything.

    Third, secure your network. Definitively use secure FTP as opposed to regular FTP. The port used for secure FTP varies from host to host. Many use port 22, some 2222, while others use different ports altogether. Check their knowledge base or call their support. You can ask this question when you notify them of the compromise in the first step.

    Never log onto your site using a public hotspot, such as those in hotels, cafes, etc. Make sure you’ve changed the default password, Ssid, (&, if applicable) the username on your router/modem. If you don’t use wireless, turn it off in your router’s options.

    All these steps are required to ensure that no one can snoop your credentials, etc.

    Now that the device you’ll use to fix your site, as well as your network, is secure, it’s time to direct your attention to actually fixing your site.

    Next, please log into your website control panel from a secure connection and change all passwords, including those to any databases you may have set up. This includes your control panel/FTP credentials & your WordPress database.

    Next, take a backup of your website’s files. Be certain to label it such that the label contains both the date you backed it up on, as well as the word “hacked”–we certainly don’t want you accidentally restoring this backup! This can be helpful, though, in terms of perhaps being able to determine how this occurred, though my feeling is that it likely did so because of an outdated site. Probably you should just back up your web root. Depending on your host, it might be called public_html, htdocs, www, or /. If you don’t wish to back up the entire root, then at least back up your uploads folder, as well as others that might contain content that can’t be replaced.

    Please also back up your database as well. The article at
    http://codex.ww.wp.xz.cn/Backing_Up_Your_Database
    shows you how to do that, in case you need it. The section regarding phpMyadmin is likely the most relevant to your case. It’s going to be necessary to search that database file to see if any evidence of the hack exists there. That can be done by opening the file in a text editor. To start off with, consider searching for the words:

    <script
    <? php;
    base64;
    eval 

    preg_replace
    strrev

    You might also wish at this point to backup your WordPress content. To do that:
    * Log into your WordPress dashboard.
    * Go to ‘Tools > Export’.
    * Choose to export all content.

    While in your dashboard, go to ‘Users > All Users’ and delete any users there that you don’t recognize, especially administrators. A WordPress account should never contain the username ‘admin’. If yours does, make an administrative account that does not contain the word (don’t forget to use a very strong password), then delete the old admin username account.

    Also be advised that sometimes supposed image files can contain code, so open all your image files, particularly in your uploads folders, to ensure they really are images & don’t contain code. Better yet, if you have the images on your machine, replace files in the uploads folders with them.

    If you find nothing, either in your database or in your /uploads folders, then the next step is to delete, then completely reinstall WordPress, as well as any plugins or themes you were using. I also advise creating an entirely new database w/a new user & password. You can then import your content into the newly reinstalled site.

    Please also let someone knowledgeable look at your .htaccess file so they can make certain no backdoor code exists there.

    In summary, here are the steps:
    1) Back up your WordPress files, including core, themes, & plugins;
    2) Back up your database using PhpMyadmin;
    3) Look through the database to insure there is no evidence of the hack;
    4) Search the uploads folders for image files that contain code;
    5) Let someone knowledgeable look at your .htaccess file.
    6) If you have doubts about your database, please have a professional take a look.

    You’ll also likely need to verify the site w/Google Search Console & see if they’re observing anything. A quick search that looks like
    site:yoursite.tld
    often yields some pretty striking results when a site is compromised. TLD standing for “top level domain”, as you likely already know.

    Thread Starter ChicagoHealthOnline

    (@chicagohealthonline)

    OK Thank you! This is very helpful information. I really appreciate your help!

    ChicagoHealthOnline, please back up the database, back up the uploads directory, & back up any premium themes/plugins your client may have, as well as wp-config.php. Then nuke the site. Take a close look at the database to ensure it’s not infected. Indeed, I urge creating another database & then importing tables like wp_posts & wp_postmeta into it. That way you’re sure the database is clean, unless the content is tainted. There are times you obviously can’t do it that way, but using a clean database is the best thing to do. You should also change the credentials in the wp-config.php file so the bad guys can’t gain entrance via that method.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘How to update without causing major issues’ is closed to new replies.