Hi there,
after following your functions.php tutorials / recommendation my site speed has indeed improved, however following severe issues now:
1. can´t access my wp backend (user and passw not accepted)
2. the search function doesn´t populate posts automatically when typing in anymore
3. I receive failure messages:
Warning: Cannot modify header information – headers already sent by (output started at /var/www/web944/html/wp-content/themes/Newspaper/functions.php:1) in /var/www/web944/html/wp-admin/post.php on line 235
Warning: Cannot modify header information – headers already sent by (output started at /var/www/web944/html/wp-content/themes/Newspaper/functions.php:1) in /var/www/web944/html/wp-includes/pluggable.php on line 1196
Warning: Cannot modify header information – headers already sent by (output started at /var/www/web944/html/wp-
Apprciate your help.
Thanks,
P.S. I´ve st back most of the things recommended, but now just can´t access the site, except
changes via ftp/filezilla.
Always delete/clear cache before updates.
Always delete old theme folder and child theme folder for new theme; upload new folders to completely replace old ones. Delete old plugins completely, install new folders. NEVER OVER-WRITE UPDATES.
Always clear cache after making changes to core files when they are working; otherwise you are loading mix of old/new from server and things break.
If you’re unable to do anything — try switching to default theme, try disabling all plugins entirely; try resetting the plugins folder (see my “how to move to new theme” for a best practice way to update/upgrade and recover from fail).
Only put stuff at end of your functions.php in MAIN folder, NOT child theme. Only add things you know what they are — most being self-evident. If site crashes when loading edited functions.php, then roll back to your backup. If site won’t recover from that, then it’s 100% a caching problem.
Often for testing via FTP, I do
a) all caching and mod_pagespeed disabled
b) rename functions.php to xfunctions.php
c) drag over new functions.php
d) test site
e) if site won’t load; via ftp with window still open, just rename xfunctions.php to functions.php and it replaces the bad functions.php — total time 20-30 seconds.
Not sure any of that helps, but maybe some pointers in some direction.