I am trying to convert some data from custom post types into custom tables in my Wordpress database. I have written a PHP program to do this. It requires that Wordpress be loaded so I can use some of Wordpress's database access methods ($wpdb). I have placed the conversion file in my site's root directory where index.php resides, but when I try and run it
http://my-site.dev/convert.php/
I get a 404 page not found error. How can I configure Wordpress or my server (I'm using Desktop Server locally for development) to run this program?
PATH_INFO
) andconvert.php
would be loaded just fine (providing it exists). However, ifAcceptPathInfo Off
is set in the server config (or.htaccess
file) then this will indeed trigger a 404 - but this is not the default behaviour for PHP handlers. But maybe this is what's happening here? (/convert.html/
on the other hand would trigger a 404 by default because the core handler rejects path info.)