I'm a bit of a PHP MySQL newb but i feel i need to bypass WordPress for the frontend of a site i'm building (it is mainly just RSS and JSON feeds). I was wondering if there are any tutorials or advice I should follow on this or just cut straight to it?


You want to include wp-load.php at the beginning of your script/page like this :


You then have access to any WP functions. To manipulate the DB directly, have a look at wpdb.

| improve this answer | |
  • Great thanks. Does it still produce the same server load to call wp-load.php as it does call a normal WP page? I'm guessing both this methods would cause more load then just writing straight PHP and MySQL to talk to the database. – agileapricot Jul 26 '11 at 10:08
  • 3
    Yes it would cause more server load (though how significant I don't know), if you want to dump WP completely, then you can just talk to the DB directly with default PHP functions. Here's the database description for WP. – mike23 Jul 26 '11 at 10:17
  • A much better approach would be to setup a RESTful API interface in Wordpress to serve the data to the app the builds the frontend. Then you can get the data and objects loaded correctly, every time, and still use it as a backend. DON'T EVER load the Wordpress files into your front-end app/site. – Patrick Feb 3 '15 at 17:34

You can even include wp-load.php without having it load the theme related files and functions to reduce the load.

define('WP_USE_THEMES', false);
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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