Documentation

1. Overview

This Documentation describes the installation and configuration steps of phpShort.

While the installation process is rather simple, some of the instructions presented here will require minimum understanding in working with databases and managing files on a server.

If you're not familiar with the procedures presented, we do offer installation Services for an additional fee.


2. Requirements

Please ensure that your server meets the following minimum requirements:

Software Modules
PHP 7.2.5+ BCMath, Ctype, Fileinfo, JSON, Mbstring, OpenSSL, PDO, Tokenizer, XML, GD, cURL
Apache 2+ mod_rewrite
MySQL 5.7.7+

3. Installation

3.1. Creating and configuring the database

If you already have an empty database, a database username and password, you can skip the next steps.

  1. Create a new MySQL database.
  2. Create a new MySQL username and password.
  3. Assign full privileges to your database username.
Useful resources
3.2. Uploading the files
On some operating systems, the dotfiles are hidden by default. Before starting to upload the files, please make sure your file explorer has the option to view hidden files turned on.

Upload what's inside the Script folder on the web root folder of your domain. This folder is generally called public_html, html, or example.com, but depending on your server's configuration, it might be named differently.

Useful resources
3.3. Configuring the files

Set the access permissions (CHMOD) to 775 to the following files and folders:

Files
  • .env
Folders
  • bootstrap/cache
  • public/uploads/brand
  • resources/lang
  • storage
  • storage/framework/
  • storage/framework/cache
  • storage/framework/cache/data
  • storage/framework/sessions
  • storage/framework/views
  • storage/logs
Useful resources
3.4. Changing the public directory Important

Configure your web server's document / web root to point to the public directory of the software. For example, if you've uploaded the software in example.com folder, your web directory should be changed to example.com/public folder.

Useful resources
3.5. Finishing the installation
  1. Go to https://example.com/install and follow the installation wizard.
  2. Once you've installed the software, login into your account, and go to https://example.com/admin.
  3. You'll be asked to activate your License Key. See how to retrieve your license key.

4. Configuration

Most of the software's settings are pretty straight forward and self explanatory, but some of them require more advanced steps to get them working, which are covered in this chapter.

4.1. Payment system

The Payment system relies on Stripe's API and requires an Extended license to be enabled.

  1. Login into your Stripe account.
  2. From the sidebar, go to the Developers section of the Stripe dashboard and click on API Keys.
  3. Copy the publishable key and secret key in Admin Settings Payment.
  1. From the sidebar, go to the Developers section of the Stripe dashboard and click on Webhooks.
  2. Click on Add a new endpoint.
  3. On the Endpoint URL field paste your URL, this can be found on Admin Settings Payment.
  4. On the Version field, select the 2020-03-02 version.
  5. On the Events to send field, click on receive all events, and click the Add endpoint button.
  6. Copy the signing key in Admin Settings Payment.
  1. You can now save your keys in Admin Settings Payment.
4.2. Plans

To create new Plans, the Payment system needs to be enabled.

By default, the software comes with a default free plan, which is available to everyone. The default plan cannot be deleted, however its features can be limited.

Possible plan values
  • -1 for unlimited.
  • 0 for disabled.
  • N for a specific number.
4.3. Tax rates
  1. Login into your Stripe account.
  2. From the sidebar, go to the Products and then click on Tax rates.
  3. Add a new tax rate.1
  1. When adding a new tax rate, if no Region is specified, the tax rate will apply to everyone. Add a ISO 3166-1 alpha-2 country code to the Region field if you wish to apply taxes per country.
4.4. Coupons
  1. Login into your Stripe account.
  2. From the sidebar, go to the Products and then click on Coupons.
  3. Create a new new coupon.
  4. Copy the coupon ID in Admin Plans Edit.
4.5. Captcha

The Captcha system relies on Google reCAPTCHA's API.

  1. Login into your Google reCAPTCHA account.
  2. Create a new reCAPTCHA v2 Invisible Badge.
  3. Fill all the other fields with the requested information.
  4. Copy and save the site key and the secret key in Admin Settings Captcha.

5. Update

Before making an update, always remember to do a complete backup of your website.
If you've made any modifications to the software's files, your changes will be lost.
  1. Make a backup of the .env config file located on your server.
  2. Upload and replace all the files on your server with what's inside the Script folder.
  3. Restore your .env config file on your server.
  4. Go to https://example.com/update and follow the update wizard.1
  1. Updates that do not have database changes, will not show up in the update wizard.

6. FAQ

  • I have a support inquiry, a question or a problem, how can I contact you?
    You can contact us here.
  • What hosting do you recommend?
    We recommend using DigitalOcean, as they offer great performance and flexibility at an affordable price.
  • Is installation included in the price?
    No, installation is not included. We offer installation services for an extra fee, see the Services section.
  • My website returns a Not Found message, why?
    Please ensure that you have mod_rewrite enabled on your server.
  • How can I translate my website?
    Make a copy of the default en.json language file found in /resources/lang folder, and change it according to your needs.
  • My website returns a blank page, why?
    This generally happens when one of the server requirements is not met, please ensure your server meets the software's requirements.