Skip links

Use WP functions outside of WordPress

Here’s how easy it use to use any of WordPress default functionality from any PHP file outside of the WordPress installation directory.

One step

Add this to the beginning of your external (non-WP) PHP file(s):

<?php require(‘../wp-install-directory/wp-load.php’); ?>

Once the wp-load.php file is included properly, all native WordPress functions are yours for the using. Enjoy!

Content retrieved from: https://wp-mix.com/wp-functions-outside-wordpress/.

Print Friendly, PDF & Email

Author

Leave a comment

This website uses cookies to improve your web experience.
DON’T MISS OUT!
Subscribe To Newsletter
Be the first to get latest updates and exclusive content straight to your email inbox.
Stay Updated
Give it a try, you can unsubscribe anytime.
close-link