WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am developing a wordpress theme and I want to use jQuery.load() to load data from a PHP file in my theme directory called process.php to a div in a wordpress page template.

I haven't had any issues with load() in the past but Wordpress is preventing me from loading the data or even accessing the process.php file in the browser.

When I navigate to the full path of the file (eg: http://[site]/[theme]/functions/process.php) I get the following error in Chrome

Internal Server Error. The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, **@gmial.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.`

I've read similar questions but they involve modifying the .htaccess file. Does anyone know how to do this from a theme perspective ie: using $wp_rewrite.


Linux Server error log states

    [Mon Mar 12 14:00:52 2012] [error] [client] SoftException in Application.cpp:245: File "/var/www/vhosts/****.co.nz/httpdocs/npr/wp-content/themes/_s_2/functions/process.php" is writeable by group [Mon Mar 12 14:00:52 2012] [error] [client] Premature end of script headers: process.php

and this is process.php

echo "hello from php";
share|improve this question
Take a look at the questions in here: ajax. Read about localize script and admin-ajax.php. – kaiser Mar 12 '12 at 1:29
up vote 0 down vote accepted

You might find this informative, not sure if it will cover what you need but it explains a lot about front end Ajax for WordPress which is not exactly intuitive and it might help you out. In particular you probably need to understand how admin-ajax.php works.

share|improve this answer
Thanks for that I'll read up more on admin-ajax.php – JackMahoney Mar 14 '12 at 23:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.