MyBB Community Forums

Full Version: Change the Uploads Path
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey all,

Wanting to change the location where attachments are saved.

I am having some issue changing the Uploads Path directory from "./Uploads" to another drive entirely (EX: "X:/attachments"). When I change the path I can save the setting but it does not stick. This is being hosted on a Windows VM and proper permissions do exsist on the new folder. I can't seem to find anything in the documents, am I missing something apparent?

All help is appriciated.

*** EDIT *** 
Removed improper solution
Please do not edit inc/settings.php. It's just a cache that will be overwritten automatically.
How about closing the board, then directly editing the same named records in mybb_settings with phpMyAdmin?
Then open the board again.
The settings just need to be changed in the ACP, editing settings.php or the database is only required when the ACP is inaccessible, which I don't believe was the case here.
The changes in Settings may be rejected if the location doesn't exist or is inaccessible.
(2021-03-10, 09:00 AM)StefanT Wrote: [ -> ]Please do not edit inc/settings.php. It's just a cache that will be overwritten automatically.

StefanT,


Ok you are totally right on this any additional change to ACP did change me back to the default "./uploads" file path. 

Did not test that yesterday.

(2021-03-10, 11:50 AM)Matt Wrote: [ -> ]The settings just need to be changed in the ACP, editing settings.php or the database is only required when the ACP is inaccessible, which I don't believe was the case here.

Matt,

So I think that's where my issue is. When setting the other path via ACP the setting saves with no errors but path will still read "./uploads". When putting that same path directly into the settings.php file it works and can confirm that attachment files get saved just fine. 

Any idea on why the "Uploads Path" field will not update properly in ACP?

MyBB Version: 1.8.25
PHP Version: 7.3.26
SQL Engine: MySQLi 10.4.17

(2021-03-10, 01:24 AM)Refrigitator Wrote: [ -> ]Hey all,

Wanting to change the location where attachments are saved.

I am having some issue changing the Uploads Path directory from "./Uploads" to another drive entirely (EX: "X:/attachments"). When I change the path I can save the setting but it does not stick. This is being hosted on a Windows VM and proper permissions do exsist on the new folder. I can't seem to find anything in the documents, am I missing something apparent?

All help is appriciated.

*** EDIT *** 
Removed improper solution

Got this working using a Symbolic Link. 

Simple guide for anyone wanting to do this.
https://www.howtogeek.com/howto/16226/co...-or-linux/

Thank you everyone for your help!