Closed onnimonni closed 9 years ago
Why do you think that second copy of Wordpress will not be loaded during using Ajax action? It will be loaded in administrative mode with all plugins and theme template!
To prevent this, I use SHORTINIT mode. In this case, Wordpress will load only important functions and database engine. This works more faster.
Please use Ajax properly as shown in here: http://codex.wordpress.org/AJAX_in_Plugins
Just add your own ajax function for wordpress. By requiring wp-load.php you force all wordpress instances to have certain folder structure. This should at least be documented.
The file which I'm talking about is
sam-ajax.php
More of this in tutorial available here: http://ottopress.com/2010/passing-parameters-from-php-to-javascripts-in-plugins/