Weblutions Docs > Product Documentation > Basic Downloads

Basic Downloads

Step 1 - Requirements

Step 2 - File Management

Simply move the files from the download into a folder for your website. Common locations include /downloads or just in the root directory.

NOTE: Some systems require permissions to upload files to directories. We suggest running the below commands in a terminal replacing the directory to represent your store.

[UBUNTU COMMANDS]
sudo chown -R www-data:www-data /var/www/basicdownloads
sudo chown -R www-data:www-data /var/www/basicdownloads/files

These commands give the webserver ownership over the files to allow us to manage files from the site.

Step 3 - SQL Database

Basic Downloads requires a database to be created or have tables imported to an existing one.

Extract the installme.sql file and place into the /root folder of your server and open and login to your MySQL terminal via SSH. Try use this command to login; mysql -u root -p If you don't have a root password just press enter.

You will need to create the database itself. To do this run the below code in your SQL terminal. For the purposes of this guide the database name will be basicdownloads but you can change that to whatever you like.

CREATE DATABASE basicdownloads CHARACTER SET utf8;

This creates the database basicdownloads with UTF8 character format. Now run

use basicdownloads;

To make us use the correct database.

source installme.sql;

This executes the installme.sql that we put into our /root folder before.

Now your database should be installed and imported. Double check this by doing use faxSbasicdownloadstoreDB and then SHOW TABLES;.

Step 4 - Setting Up Discord OAuth2

To set up Discord OAuth2 head to the Discord developer portal and create an application for your store. Once you have created an application for your store go to the OAuth2 tab on the left side and add a redirect and write https://mydomain.com. Make sure there is no trailing / this should be the same as your link to your store. So make sure to replicate that.

Make sure the directory (like /downloads) is added into the above if you have one.

Step 5 - Configuration

Now edit the config.php file and edit to include the information from prior steps and too your liking.


Change the maximum upload file size on PHP
see this guide on doing this as larger uploads may need this setting changed. We also recommend changing this anyways! stackoverflow.com/change-the-maximum-upload-file-size

Config Options:

Name Description Type
siteName The site name to display. String
embedColor Hex color for the sites embed color. String/Hex Color
siteDescription A basic description of the site. String
host The remote server to use. This should be an IP for a server or if it’s the machine then use localhost String
username The username used for the SQL login. String
password The password used for the SQL login. String
dbName The database name which contains the SQL tables. String
installLocation The install location that the site is located. this needs to be the full drive location. Backslashs need to be converted to forward slashs. String
webDirectory The web directory that the site is under (like /downloads). If there's not one leave it empty. String
discordClientId The Discord application ID. String
discordClientToken The Discord secret (not bot token) for the application. String
admins An array of Discord user IDs to have admin access to the site. Array

Review this page

FAXES