Change SQLITE Database File location

Hi,

I am trying to run writefreely in a restricted windows environment. meaning : the executable has to be run out of c:\Program Files, while the writable files have to reside outside of that (i.e. in my Profile Path aka Documents) to be writable by users. I found the cli to pass the config.ini as an argument from a different location. How could I do that for the writefreely.db that has been located unter the program folder and is as such not writable by normal users?

The filename / location of this file is set in your config.ini file, under the [database] section:

[database]
type     = sqlite3
filename = writefreely.db
...

So you should be able to provide a full path to the file there, restart your server, and it should load from the correct location. But I haven’t personally tested yet. Want to give that a shot and let us know if that works?

Thanks Matt, that actually worked perfectly. didn´t think of it, because the examples all just showed the bare file name.

Runs like a charm so far. So I’ll be testing and trying on how to put it to use here.

Michael

Great, glad to hear that worked!

1 Like