Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configuring an IDE (PHP Storm) to include WordPress as an external library

Tags:

php

ide

wordpress

I like to have need to have my IDE (PHPStorm) include the WordPress codebase as an external library by default.

Using the project files stored on a remote server option, I have to choose the WordPress root as the directory and download all the core files if I want to get the full benefit from the IDE.

Is there a way to include the WordPress code base as an external library that loads by default in all projects? The feature is available for javascript libraries but I have gone through all the settings and can't find any way to add WordPress in less it's in the root of my project.

Edit:

Is this the wrong approach? Does it make more sense to specify my local mirror as a subdirectory of an existing project that includes WordPress core? All projects need to remain separate.

like image 756
Chris_O Avatar asked May 26 '11 06:05

Chris_O


1 Answers

You can try to put the wordpress codebase in phpstorm's settings "include path" : But you need to do this for every project (this is how phpstorm works, but this enable you to have different php versions for your projects).

Go in File > Settings > Project Settings > PHP You must then locate your PHP version, then you will be able to add manually include paths, and use php.ini's include path.

like image 70
Rodolphe Avatar answered Sep 22 '22 01:09

Rodolphe