Here's my advice, and i apologize if it's not what you need.
You are pounding sand with PHP and wordpress.
SAM now comes with great template files, i.e. - _history.json, _queue.json, _requests.json and the like. You can compile these into one very nice JSON file to upload to your webhosting domain in some random folder.
Learn any frontend framework - React, Vue, Angular, Django...
You can make a private repo on GitHub for free, add a CNAME file to your repo to point to your domain. Watch a 3 hour Udemy class or one of the millions of YouTube tutorials on how to use JSON files for frontend output with if checks and for loops.
You can pull your hair out opening this port and that port and contacting your hosting provider and blah, blah, blah. Or, just use 1 simple file to format how ever you want. No need to connect to a database from anywhere, no need to have special admin permissions for this and that.
You can use Heroku or Netlify and the like to host your repo instead of paying gross amounts of money to hosting companies. I pay $5-15/month based on usage. I used to do the whole PHP thing with Bluehost/Joomla, payed $1200/year for crap. Had to use all sorts of hacks, including festerhead stuff (which is 10+ years old).
Wordpress is the pretty girl with issues. Everyone is attracted to it, no one wants to keep it once they find out how crazy it is.
All the time you spend on getting SAM, PHP, Wordpress, ports, permissions, port forwarding, plugins, custom PAL scripts and stuff to play nice could be better spent learning any modern language and using 1 JSON file to rule them all!
(just my opinion, from someone that went though all you're going through