[Solved] Phpstorm doesn’t know how to run WordPress

[ad_1]

You are directly calling theme’s index file which is not correct way, as your theme must be using some default functions of WordPress, like get_header() in this case.

So you need to make sure wp-load.php is loaded to make all WP functions available to use. You have two way for that:

1) Call root index.php so everything will be loaded by default.

2) Call theme’s index.php but add Below code in that:

if(!function_exists('get_header')) {
    require_once( '/wp-load.php' );
}

However this is not good way 🙂

5

[ad_2]

solved Phpstorm doesn’t know how to run WordPress