Weblutions Documentation > Product Documentation > Basic Downloads

Basic Downloads

Step 1 - Requirements

  • (Web-)Server to host the site
  • Nginx, Apache or similar web-server software
  • PHP 7.0+ installed
  • MySQL Server
  • Domain
  • SSL

    If you don't have any of the above, it's okay, that's also in the guide!



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:

NameDescriptionType
siteNameThe site name to display.String. If there's not one leave it empty.String for the application.[String][string]
adminsAn array of Discord user IDs to have admin access to the site.[Array][array]

[array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array

[string]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String

[hexcol]: https://www.w3schools.com/colors/colors_picker.asp


Suggest an edit

Review this page

FAXES

1 recommend this page