Ajax calls to WordPress stopped working after move to new host
-
Our website has a WordPress blog in a subdirectory. On the site’s home page, a basic ajax routine (XMLHttpRequest) loads the latest posts into the sidebar. Well, it did until our VPS host moved us to a new host, even thought the environment is virtually identical (Linux Apache 2.2, PHP 5).
Another ajax call to a photo gallery (Coppermine) still works. I have tried every possible path as well as a call to a php file in the home directory to then load the WordPress script. The WordPress script itself still works fine if directly loaded in the browser. If its extension is changed from “php” to “txt”, the file (unprocessed) is loaded by ajax. If the ajax script is moved to reside in the WordPress directory, it still does not work.
So there appears to be something now preventing WordPress from running the script when called by ajax. The script in the WordPress directory uses
$wpdb->get_results("SELECT wposts.* FROM $wpdb->posts ...
What might be causing this failure?
- The topic ‘Ajax calls to WordPress stopped working after move to new host’ is closed to new replies.