1

I am using wordpress, and need to have a php file to do some non-wordpress logic.

If you try and navigate to it, wordpress thinks you are looking for a wp page, and does not find it, so responds with a 404.

Is there anyway to get workpress to allow access to a php page?
Maybe by changing the .htaccess file redirection rules?

1
  • 3
    by default the -f flag is so that the rewrite rule is not processed for files, post your .htaccess. Commented May 1, 2014 at 1:46

1 Answer 1

2

Pu the file in the wp installation folder where you have the folders wp-admin, wp-content and wp-includes. Then you can reach it using the yourWpSite/filename.php

You can also put it in your theme folder but then you have to reach it like this: yourWpSite/wp-content/themes/yourTheme/filename.php

Sign up to request clarification or add additional context in comments.

1 Comment

what would be really perfect is if you could map a url like yourWpSite/filename to automatically go to yourWpSite/filename.php but if you do that, wordpress tries to look for a page named filename instead of a php page

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.