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.
-
1Can'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.– RupCommented 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.– RupCommented 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?– DanishCommented Mar 5, 2021 at 21:23
-
is there any thing need to be done in .htaccess file?– DanishCommented 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.– DanishCommented Mar 5, 2021 at 21:28
|
Show 6 more comments