0

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.

enter image description here

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!

1

If 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.

1
  • I was just searching for <?php and <? openers and closers, I noticed some proper error logs once changing and trying to trace through it. What a mess, thanks for the suggestion! – rkDev Aug 7 '20 at 15:24
0

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.

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.