Skip to content

How to install mkwtas on your machine

boumi21 edited this page Jan 14, 2023 · 3 revisions

Requierements

  • A local web server with Apache, PHP & MySQL like XAMPP (Windows, Linux, Mac)
  • The code editor of your choice like VSCode
  • A Github account (and basic Git knowledge)
  • A Discord Account for website's authentication

Get the code

If you are unsure on how to clone a Github repository, please check this help.

  • Clone this Github repo in your web server's root. The path should looks like : xampp/htdocs/mkwtas_website/YOURCODE

    • NB : You can choose something else than "mkwtas_website" for your website's folder. But keep that in mind and replace it when needed.
  • From this point, if you started your Apache web server, you can go on http://localhost/mkwtas_website/wait.php. If you don't see a page appear and get an error, please ensure you did the previous steps correctly.


Configure the website

Your web server is running and it seems like you can access mkwtas locally. That's a very nice start 🙆‍♂️ It still needs a few more steps to have it running with everything ready!

Set up the database

mkwtas.com is slightly less interesting wihtout any TAS 🤔 Let's add some data!

  • Start the MySQL service from your XAMPP instance
  • Go on http://localhost/phpmyadmin/ and create a new database named "db_mkwtas"
  • After selecting your new database, click on import on top of the page and select the file "db_mkwtas.sql" located in database/db_mkwtas.sql. Then click on "Import" at the bottom of the page (no need to change others parameters).
  • After a while, you should have the database imported on your MySQL server.

Set up a discord application

mkwtas.com uses Discord authentication to let administrators manage the site. We need to register a new application on Discord that mkwtas.com will call.

Modify the settings

Now that your database and discord application are set up, we need to add their info in the project 📖

  1. Go in the settings folder
  2. Duplicate config.ini.template
  3. Rename the duplicated file in config.ini
  4. Edit the config.ini file as follow :
    • Edit the database variables if needed
    • Edit id & secret from the discord variables with your Client ID and Client Secret that you saved previously
  5. Add your Discord ID in the list of Authorized Admins
  6. If your website folder is not named "mkwtas-website", go in php_scripts/constant.php and edit the SITE_FOLDER variable.

Test time!

Everything should be set up now!

Navigate through the website, tries to login with Discord... Everything should be functionnal! If you encounter any error, review every step carefully ⚠️