# open_basedir option and wp-cli



## fred974 (Nov 16, 2016)

Hi all,

I do managed my wordpress website using WP-CLI and use the open_basedir option in /usr/local/etc/php.ini to add a bit of security to it..
I had issue to run wp-cli with open_basedir and after a bit of messing around, I got it to work using the following:
	
	



```
open_basedir = "/usr/local/www/dev/httpdocs:/usr/local/www/prod/httpdocs:/usr/local/bin/wp:/home/myuser"
```
My question this: is it safe to allow add the /usr/local/bin/ directory in there?
Can I have everything in /usr/local/bin/ compromised?

Thank you in advance
Fred


----------



## SirDice (Nov 16, 2016)

Your php.ini should be in /usr/local/etc/, not /etc/.


----------



## fred974 (Nov 16, 2016)

SirDice said:


> Your php.ini should be in /usr/local/etc/, not /etc/.


Yes sorry that was a typo.. I have it in /usr/local/etc/.
I corrected the post


----------



## fred974 (Nov 18, 2016)

Hi guys,

All advise are welcome


----------

