Media directory location
This section is meant to let the administrators to decide where to place the media directory for each collection. By default, the media folder is created in a special directory inside the b2evolution’s file structure. This special directory is located in
/media/[coll_slug], where coll_slug is the value of the URL "filename" parameter of the current collection (more information about this parameter could be found here: Collection General Parameters).
- None: you will disable the media directory for this collection. It is important to know that the current media directory must be empty, otherwise, the system will throw an error message to warn you that it is not and will abort the requested change. So, you will need to manually delete those files, using the File Manager, before to choose this option. Important: we discourage the use of any external tool to delete files from the media folder (FTP, hosting file manager, etc.), in order to keep the health and cleanness of your meta-data database.
- Subdirectory of media folder: a new subdirectory will be created and named as you set it in the text field next to this radio button. Please, note that by performing this action all the files will be moved from the old directory to the new one. It is important to remember that the new folder will be located in
/media/and not in
/media/blogsas the old one probably was.
- Custom location: you are able to set a completely different location for the media folder of the current collection. In this case, you will need to provide the folllowing information (please note that both values are required):
- Directory: full path of the new media folder. (i.e.: /home/mydomain/custom_media_folder)
- URL: the URL that points to the directory set above (i.e.: http://mediafolder.mydomain.com).
Note: you may set any location for media folders, however, each change that you make in this settings will involve a physical files and folders movement in the disk, so you must be sure about this action because it could cause an outage in the server, according with the number of files and their weight as well. Although b2evolution will automatically perform all the movements in the files structure, it is recommended to make a backup before to take any action.
Considerations about "Custom location":
- Make sure that PHP has write permissions on the new path that you are about to set.
- The URL field must be directly pointed to the directory, otherwise, the file manager will not work properly.
- Validations about the new folder:
- It must not exist, because it will be automatically created by b2evolution.
- It must not be already assigned to any other collection. Even subfolders of another media folder are also avoided.
- It must not be named as any of the preserved default media folders i.e.:
Created by • Last edit by on Jul 20, 2015