4

I installed this plugin https://wordpress.org/plugins/wp-gallery-custom-links/ and got an error during install that I didn't have time to read before the page refreshed.

Now my media picker didn't load at all.

I removed the plugin completely with no luck, and now I can't even reach the wp-admin anymore. Getting errors like:

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/xxxx.com/httpdocs/wp-content/themes/caroli/functions.php:1) in /var/www/vhosts/xxxx.com/httpdocs/wp-includes/pluggable.php on line 1196

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/xxxxx.com/httpdocs/wp-content/themes/caroli/functions.php:1) in /var/www/vhosts/xxxx.com/httpdocs/wp-login.php on line 425

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/xxxxxx.com/httpdocs/wp-content/themes/caroli/functions.php:1) in /var/www/vhosts/xxxxx.com/httpdocs/wp-login.php on line 438

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/xxxxxx.com/httpdocs/wp-content/themes/caroli/functions.php:1) in /var/www/vhosts/xxxxxx.com/httpdocs/wp-login.php on line 425

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/xxxx.com/httpdocs/wp-content/themes/caroli/functions.php:1) in /var/www/vhosts/xxxxxx.com/httpdocs/wp-login.php on line 438

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/caroli.hosterspace.com/httpdocs/wp-content/themes/caroli/functions.php:1) in /var/www/vhosts/xxxxxxx.com/httpdocs/wp-includes/pluggable.php on line 925

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/xxxxxxxxx.com/httpdocs/wp-content/themes/caroli/functions.php:1) in /var/www/vhosts/xxxxx.com/httpdocs/wp-includes/pluggable.php on line 926

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/xxxxxx.com/httpdocs/wp-content/themes/caroli/functions.php:1) in /var/www/vhosts/xxxxxx.com/httpdocs/wp-includes/pluggable.php on line 927

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/xxxxxxxx.com/httpdocs/wp-content/themes/caroli/functions.php:1) in /var/www/vhosts/xxxxxx.com/httpdocs/wp-includes/pluggable.php on line 1196

I have downloaded a fresh copy of wordpress and replaced the wp-admin folder, the wp-includes folder, wp-config.php file, wp-login.php file.

I have tried changing name on the plugins folder, still does not work, I have tried removing my theme to be able to reach the wp-admin, but still doesnt work.

I suspect it might be the database, but i'm out of luck to find the issue.. Can anyone help ?

Mark Davidson
  • 5,503
  • 5
  • 35
  • 54
Joelgullander
  • 1,624
  • 2
  • 20
  • 46

2 Answers2

3

I've been across this issue several times, as said by Vaviloff, a space is placed in the beginning of the file (before <?php) is the thing your looking for.

Some possible reasons :

  • a corrupted plugin
  • a corrupted theme
  • an intrusion in your Wordpress installation (you'll see some eval() in the beginning of the file)

Possible solutions :

  • check the relevant file : /var/www/vhosts/xxxx.com/httpdocs/wp-content/themes/caroli/functions.php:1 and remove the space before <?php
  • disable latest plugin you've installed to see if it does anything
  • run a plugin like Wordfence (just in case), it will scan your files faster than you could do manually and check differences with WP core or look for suspicious code (the free version can do all of this)

EDIT : I just saw you can't reach wp-admin. That's tricky, but I've had the same problem some times. And well, it was an intrusion (due to an obsolete plugin).

What did I do ?

  • a backup of my theme
  • a backup of my DB
  • a backup of my uploads
  • a list of installed plugins
  • changed all passwords
  • removed all the relevant part of the server (AFTER ALL BACKUPS)
  • reinstalled fresh WP
  • restored theme / DB / uploads / plugins (check the last update of your plugins when you install them)
  • installed Wordfence, just in case
enguerranws
  • 8,087
  • 8
  • 49
  • 97
2

Cannot modify header information - headers already sent by

Means that in some file there already was some text sent to the browser, before end of the script was reached.

output started at /var/www/vhosts/xxxx.com/httpdocs/wp-content/themes/caroli/functions.php:1

Check that file, there probably is a space in the beginning of the file before <?php code start declaration.

I there is no space at the beginning of the file, maybe the culprit is UTF BOM and you should remove it with the help of a text editor, for example Notepad++ has an option to do that (Encoding -> Convert to UTF-8).

Community
  • 1
  • 1
Vaviloff
  • 16,282
  • 6
  • 48
  • 56
  • Unfortunately the issue is not that. I have checked for blank space, I have converted to UTF-8, still no luck – Joelgullander Dec 11 '15 at 08:49
  • 1
    Well, the error log you provided definitely points at the caroli/functions.php file, line 1. Do you happen to have a backup of that file? – Vaviloff Dec 11 '15 at 08:53