igorhrcek / wp-cli-secure-command

Secure package for WP CLI, built to provide an easier way of securing your WordPress installation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

file manger always edits in the current working directory

janw-me opened this issue · comments

Describe the bug
File manger always edits in the current working directory.

To Reproduce
Steps to reproduce the behavior:
run wp secure block-php plugins from the $HOME directory.
An .htaccess will be created in the home directory.
Even if a --path is specified.

Expected behavior

This is a tricky one. I think the default --path should be the default one in 90% of cases.
But an .htaccess can also be located above a public folder. Probably the same applies to the nginx config files.

If the default path is respected a way for an exception should be available. maybe a --config-path flag.

Not a clear cut solution for this one.

*I see the file-path now.
Still I would think the given --path should be a default.

--path refers to a WP installation path, --file-path expects the actual file path like /home/something/something/.htaccess