1

I want to create a folder within wordpress site at root and add a php page abc.php with simple code like <?php echo "Test php page." ?> But when I try to run this page like this http://mydomainname.com/Myfolder/abc.php it gives error "This site can’t be reached" Why it is not reading my php page. I did the same on my another domain and it is working fine. Please help.

11
  • 1
    Can't be reached? That shouldn't happen: if that's the correct path to a file the exists on disk then the server should run it without any interference from WordPress, assuming you have a reasonably default server configuration. Check your server access logs and errors logs.
    – Rup
    Commented Mar 5, 2021 at 21:19
  • However, that's not the WordPress way. If you want to run specific PHP you should probably do it as a shortcode or on a page-specific template.
    – Rup
    Commented Mar 5, 2021 at 21:20
  • Page exists at its correct location. I will learn about shortchode and page specific template. I will also check logs. Is there any server config that can restrict a page to run this way?
    – Danish
    Commented Mar 5, 2021 at 21:23
  • is there any thing need to be done in .htaccess file?
    – Danish
    Commented Mar 5, 2021 at 21:25
  • It is actually a payment gateway I have to create a page for user to enter amount and then redirect to 3rd party payment page.
    – Danish
    Commented Mar 5, 2021 at 21:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.