![](/images/homepage/stackoverflow_2021-05-11-200815.jpg)
StackOverflow question answered: How to include WordPress functions in custom .php file?
I answered this question on StackOverflow way back in March 2013 and it still gets views and upvotes today.
The question:
![](/images/homepage/so-question1.png)
My answer:
![](/images/homepage/so-answer1.png)
If you've found this page because you're looking at a way to include Wordpress in an external PHP file, then this is your lucky day! The answer is:
$path = "/home/yourhome/public_html/wp"; // <--- This is the path to your Wordpress installation. require_once($path . "/wp-load.php");