0

Since my wordpress-instalation updated itself, i cant get access to the wp-admin page. All i get is a blank page with

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/v084729/wordpress/wp-content/themes/sjr/functions.php:1) in /www/htdocs/v084729/wordpress/wp-includes/pluggable.php on line 1251

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/v084729/wordpress/wp-content/themes/sjr/functions.php:1) in /www/htdocs/v084729/wordpress/wp-includes/pluggable.php on line 1254

Can anybody help me?

Thanks in advance!

Kevin

  • It looks like the problem is in your theme. The simplest way to make this work would be to rename the sjr directory and symlink it to a default theme e.g. twentynineteen instead. However that would remove the theme from your site in the meantime. You could also make a second copy of the site, change the theme files in that copy only and add WP_SITEURL and WP_HOME to the copy's wp-config so that it works without redirecting you - you should then be able to log into the admin site on the copy to investigate. Or you can just try debugging your theme and hopefully spot the error there. – Rup Oct 15 at 10:54
  • Incidentally since the output from the first line of the theme I half suspect someone's put some malicious code into your theme. The first line of /www/htdocs/v084729/wordpress/wp-content/themes/sjr/functions.php should just be <?php - if there's more than that's suspicious, e.g. the example here. Can you replace it with a fresh copy of the theme, and make the files read-only to the web server process (so that any remaining infection can't just put them back)? – Rup Oct 15 at 10:55
  • activate another theme and problem should go away. If the problem is with your theme, then make sure there is no space/new line before opening php tag (<?php). If that's not the case, you will have to consult with a professional. – maverick Oct 15 at 10:57
1

Compromised theme, most likely. Check theme files for inserted code, along with inserted code in other files. Change credentials everywhere (Host, database, wp admin, ftp).

Look at all files manually, plus files that shouldn't be there (like extra ICO files as in .somefile.ico , which have php code inside. (Notice the leading dot, which indicates a hidden file, so make sure you are showing hidden files also.) Check your htaccess file also.

For the probably-compromised theme, nuke it and re-upload theme files from known good source.

1

A quick solution is to simply navigate to wordpress/wp-content/themes/sjr/ and rename the theme folder.

For example sjr to sjr-backup - this will cause WordPress to pick another theme or no theme at all. Allowing access to the admin dashboard again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.