Run PHP Scripts for testing outside my main Wordpress site.

  • Answered
My primary website bbbrown.com is a Wordpress site. I have some small image retrieval PHP scripts that I would like to run but they fail. When I look at the source for the generated website there are html codes in it. I placed the php files in a folder outside my public_html folder under root. I checked on Cpanel and I have PHP enabled there. What can I do to test these php scripts without them showing up in my Wordpress site?
Scott
Hello Bob3rd,

Thank you for your question about running php test scripts. If you are calling the script via a URL, you will need to have the scritp at least in your public_html folder or below. You can call the script without it involving WordPress.

For instance, in my site, I place the test script in test.php. Then I simply call the file using my URL: example.com/test.php

As long as your test script does not call any dependencies from the WordPress, it will run independently.

Kindest Regards,
Scott M