Closed fotan closed 2 years ago
The prefix is only applied to the default dbname
, so you can currently provide whatever you want by passing the --dbname=<name>
option which would not be prefixed. I wouldn't recommend using the config for this though because then it would try to create every site using the same DB name unless provided in the command.
It sounds like what you are looking for would be a way to configure the prefix used in the default DB name?
Yes. I was hoping I could just add the site name to the option in the config. It wouldn't be horrible to just add --dbname=
It wouldn't be horrible to just add --dbname= to the command though, if that's the actual string I need to use.
Yes. For example, if you wanted a site my-site
with a matching DB name, you would use this command:
wp valet new my-site --dbname=my-site
Obviously the downside is that you're duplicating the name in the command, but this is the way you'd achieve what you are trying to do as things are now.
Ok. That can work. Much appreciated.
Is there some way to get rid of the wp_ database name prefix? Not a huge deal, but it's just annoying enough.
I see the line in config.yml (# dbname: defaults to wpname) but simply removing wp from it give you a db named "name". Is there some way to insert the site name instead?