WordPress Custom Shortcode Not Displaying or Breaks Page

So, i’m working locally on this site, tweaking my Wikipedia User Contributions Display plugin, and i noticed that some tweaks i pushed live are actually working fine, but locally they’re not (kinda backwards, i know). Heck, anything after the plugin shortcode doesn’t display–it actually breaks the site (footer scripts and other code fails to run). I google for some fix but nothing concrete. I spot something about PHP may be the culprit, but no one answered or gave any weight to that suggestion.

I checked the PHP version of my local MAMP server and my live/production server. Former is 7.1.8. Latter is 5.6.35. Hmm. So, i open up MAMP, stop server, switch PHP from 7.1.8 to 7.0.22. Restart the server and refresh the problematic page. Boom. It works now.

I learned that something in version 7.1.8 breaks WordPress shortcodes. At least custom shortcodes. That’s all i have so far. I just wanted to have a post for today and get my thoughts out. If you run into a custom shortcode breaking your WordPress pages, try changing PHP version.

Also, this situation has given me more of a push to purchase MAMP Pro for its expanded feature list, like having multiple server configurations (ngnix, Apache, etc), including PHP versions. Would make development life easier, especially since ya never know what server setup a client has or what a new webhost has.

Cheers.

(Visited 81 times, 1 visits today)

If you found this post useful ...

Buy Me a Coffee logo
Wondering why you keep seeing lower-cased 'i' in my posts? Read -> Why ‘i’ is not capitalized
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x