If you place the file in the WP root directory, e.g. http://mysite.com/myscript.php
require( dirname(__FILE__) . '../blog/wp-load.php' );
if (function_exists('wp_create_user')) {
echo "wp_create_user() found";
}
If you are in a different directory, just make sure you are loading wp-load.php from the proper location.
Related Posts:
- Creating a Dynamic Path to wp-blog-header.php
- Loading wp-load.php in an external PHP file throws unknown error
- What is the correct way to use WordPress functions outside WordPress files?
- Initialize WordPress environment to use in command line script
- Displaying content from one WP site on separate WP site
- Is it possible to get post metadata of referring page?
- Problem accessing wp-load.php
- Why I have this error when I try to install this old blog on my local webserver?
- WordPress function gives different results outside vs inside PHPUnit test
- How to avoid wp-load.php within a PHP/CSS file?
- How to efficiently load and use the wordpress API from outside the original structure
- Best way to load WordPress Bootstrap
- Check user logged in from outside of WP folder
- wp-load.php not working
- Why I have this error when I try to install this old blog on my local webserver?
- WP_load, shortinit for wordpress Ajax
- WordPress Nexus Theme front-end editor broken because cannot find wp-load.php [closed]
- Fetching latest posts from 2 different WP installations
- Which position is after `wp-load.php`?
- Exploiting WordPress Core Functionality for Development
- Why I have this error when I try to install this old blog on my local webserver?
- How to include wp-load.php and have all plugins load as well
- content of the page is not displaying getting empty page [closed]
- What is the very earliest action hook you can call?
- How to load WordPress on non WP page?
- Notice: map_meta_cap was called incorrectly
- Initialize WordPress environment to use in a real cron script
- Trying to avoid including wp-load.php
- Create a post variable processing page
- external wordpress pages using wp-blog-header
- do_action and hook methods
- update_option not working in stand-alone PHP script
- Dynamic iCal generator outside/inside wordpress
- Admin first hook that outputs HTML?
- Limiting conditional comment to home only in header.php
- How do you load WordPress from an external script when using MultiSite? [duplicate]
- Call to undefined function issue
- Problem with using wp-load.php outside of WordPress
- Include user defined styles without including wp-load
- How to determine if an admin is logged in outside the loop
- How to avoid loading wp-load.php from external php scripts?
- Fatal error: Call to undefined function get_post() with ajax
- Downsize CPU & DB usage in wordpress
- include wp-blog-header not working on MAMP
- Using WPDB to output raw XML fails because of wp-blog-header.php
- Call to undefined function wp() in wp-blog-header.php
- Load WordPress functions outside WordPress files in Add on Domain [closed]
- How to access $menu variable in custom .PHP file that loads wp-load.php?
- how to add H1 in title site?
- getting logged in user info (wp-load.php) from parent directory
- WordPress server change – slow admin login time for first time
- Access bloginfo, get_option, and plugins_url from a non-core php file
- WP CLI can’t delete plugin related table
- What hook is the currently active theme’s functions.php file loaded on? [duplicate]
- Load Next WordPress Posts With AJAX?
- Fatal error: Uncaught Error: Call to undefined function wp()
- include multiple wp-blog-header.php from different blogs
- How to determine from a different folder (outside wordpress) if a visitor is logged into WordPress
- Why does WP load so many files in the head of source code? How do I optimize it?
- How can I call wp-load.php in my plugin file
- WordPress archives in header -necessary?
- External PHP file & Pretty Permalink
- WordPress and IPN problem
- PHP mobile redirect Endless loop
- Including ‘wp-load.php’ after another include() generates an error
- Subdomain redirect problem
- Show preview of wordpress posts on external html sever
- I created a plugin with ‘view page’ that uses MYSQL + PHP. When I use wp_insert_post(), it turns everything to HTML
- How to load WordPress on non WP page?
- how to define a html folder to make it work with WordPress commands
- Doesn’t call user information to include “wp-load.php” in an external php file
- my header.php page got erased when i trying to post google tag manger code , how can i retrieve it, rest of the theme is ok
- Add custom field information to source meta data
- How to get option values without requiring wp-load?
- Causing my WordPress functions to execute twice
- Error establishing a database connection – after updating DNS
- How to extract some part of WordPress full source code
- How to access WordPress functions outside WordPress with 2 different WordPress installations?
- Allow the execution of an external PHP script for logged users
- Could not find wp-load.php issue
- What is the best practice to initialise $wpdb by loading wp-load.php?
- why get_header doesn’t work twice in a test
- Get permalink of a post without using WordPress functions
- Manually cache a special, non-WP-but-using-WP page (e.g. Ajax results) with W3TC
- WordPress Footer Widget Processing
- Using actions, hooks and filters in a non-WordPress page
- Do_shortcode on PHP file outside theme ALMOST works
- allow previews outside wordpress folder (Outsourcing WP previews)
- Run A Pre-Built Core PHP Application Under A WordPress Page or Post Route
- Get Core Functionality from Within a (Secondary) Plugin File
- WordPress repository forbids me call wp-load.php in non-WordPress file
- How do i get a specific user metadata using custom metavalue outside of wordpress?
- Files placed in directory with wordpress 404
- What is Global WordPress Objects?
- Include root files into header files
- how to use header function in wp-load.php file [closed]
- Turning WordPress Into full-featured website?
- How to use add_action(“wpcf7_before_send_mail” outside wp loop?
- Sessions in word press [duplicate]
- Use ajax response in PHP function