This is an older custom theme. On the live server, I updated to the latest version of WP, updated all plug-ins including ACF. Downloaded all files, DB, and renamed to local URL. I've done this many many times with various builds and have never had an issue.
Running MAMP, the browser is outputting PHP code from the functions.php file. Not the header or any CSS, I see HTML is loading after this. Also can't get to /wp-admin, same result.
PHP running on live server 7.3.11, closest on MAMP is 7.39
Any suggestions on where to look? I was not the original theme developer. This is maddening, as I just need to do a simple homepage redesign and can't develop locally. Not to mention not billing for time troubleshooting. THANKS IN ADVANCE!
This is an older custom theme. On the live server, I updated to the latest version of WP, updated all plug-ins including ACF. Downloaded all files, DB, and renamed to local URL. I've done this many many times with various builds and have never had an issue.
Running MAMP, the browser is outputting PHP code from the functions.php file. Not the header or any CSS, I see HTML is loading after this. Also can't get to /wp-admin, same result.
PHP running on live server 7.3.11, closest on MAMP is 7.39
Any suggestions on where to look? I was not the original theme developer. This is maddening, as I just need to do a simple homepage redesign and can't develop locally. Not to mention not billing for time troubleshooting. THANKS IN ADVANCE!
Share Improve this question asked Aug 7, 2020 at 14:39 rkDevrkDev 11 bronze badge2 Answers
Reset to default 1If it's outputting some PHP from functions.php but not the whole file then likely you've just got mismatched PHP opening/closing tags - <?php
and ?>
somewhere, or potentially even mismatched string quotations.
You need to edit that file in a text editor and look carefully around the point it's starting to output PHP for mismatched entities. A good editor that does PHP syntax highlighting will make this much easier.
As it turns out, MAMP is ignoring php openers with just <?
not <?php
, but if I started changing them, parts of the site render. There are hundreds if not thousands of entries, a huge site with lots of parts. This is the latest syntax and not sure why MAMP won't process it. Googling isn't bringing back many results.