Docs Installation Installation — DirectAdmin Hosting

Installation — DirectAdmin Hosting

Before You Begin: Server Requirements

Your hosting account must meet these requirements before installation can proceed. The installer checks these automatically and will block you from continuing if any required item fails.

Required:

Requirement Minimum
PHP version 8.3 or higher
MySQL Any version supported by your host
PHP extension: bcmath Enabled
PHP extension: ctype Enabled
PHP extension: curl Enabled
PHP extension: dom Enabled
PHP extension: fileinfo Enabled
PHP extension: gd Enabled
PHP extension: json Enabled
PHP extension: mbstring Enabled
PHP extension: openssl Enabled
PHP extension: pdo_mysql Enabled
PHP extension: tokenizer Enabled
PHP extension: xml Enabled
PHP extension: zip Enabled
PHP setting: allow_url_fopen On
PHP memory_limit 128M or higher

Optional (recommended but not required):

Extension Why it helps
imagick Better image processing

How to check and set your PHP version in DirectAdmin:

  1. Log in to DirectAdmin.
  2. In the left sidebar, click Extra FeaturesPHP Selector (or navigate directly to Your Account → PHP Selector depending on your host’s DirectAdmin version).
  3. You will see the current PHP version for your domain. If it is below 8.3, select a newer version from the dropdown and click Save.
  4. To enable or disable individual PHP extensions, look for an Extensions tab within PHP Selector. Enable any missing extensions from the list and save.

Note: If PHP Selector is not visible, your host may manage PHP versions differently. Contact your host and request PHP 8.3 with the extensions listed above. Do not attempt to install on an older version — the installer will not let you continue.


Step 1: Download the Script

  1. Open your purchase confirmation email and click the download link, or log into your license portal at {{PORTAL_URL}}.
  2. Download the Traffic Exchange Script ZIP file.
  3. Keep the ZIP file on your local computer — you will upload it in the next step.

Step 2: Create a MySQL Database

The installer needs a database to install into. Create one in DirectAdmin now so you have the credentials ready.

  1. In DirectAdmin, click MySQL Management (found under Your Account or in the main dashboard panel depending on your host’s layout).
  2. Click Create New Database.
  3. Enter a database name (e.g. mysite_te). DirectAdmin will automatically prefix it with your account username (e.g. youraccount_mysite_te).
  4. Enter a database username and a strong password. Click Create.

Important: Store the username and password somewhere safe. You will need them during installation.

At the end of this step you should have: – A database name (e.g. youraccount_mysite_te) – A database username (e.g. youraccount_dbuser) – A database password

Note: DirectAdmin prefixes database names and usernames with your account name. The full database name is what you will enter in the installer, not just the part you typed.


Step 3: Upload the Script Files

You can upload using DirectAdmin’s File Manager or an FTP client. Choose whichever you are more comfortable with.

Option A: DirectAdmin File Manager (no FTP client needed)

  1. In DirectAdmin, click File Manager (under Your Account or the main navigation).
  2. Navigate to the folder where you want to install the script. This should be above your public_html folder — for example, in your home directory (/home/youraccount/). Create a new folder if needed (e.g. traffic-exchange) by clicking New Folder in the toolbar.

Important: Do not upload the script files directly into public_html. The script has its own public/ subfolder that becomes the web root. See Step 4 for how to connect it to your domain.

  1. Click Upload Files in the toolbar and upload the Traffic Exchange Script ZIP file.
  2. Once the upload finishes, select the ZIP file and click Extract (or right-click the file and choose Extract). Extract it into the folder you created (e.g. /home/youraccount/traffic-exchange/).
  3. You should now see the extracted script files including folders like app/, public/, storage/, resources/, and files like artisan and .env.example.

Option B: FTP Client (FileZilla)

  1. In DirectAdmin, go to FTP Management to create an FTP account or retrieve your credentials.
  2. Open FileZilla and connect using: Host = your domain or server IP, Username and Password from DirectAdmin, Port = 21.
  3. In the remote panel, navigate to a folder above public_html (e.g. /home/youraccount/traffic-exchange/). Create the folder if it does not exist.
  4. On your local computer, extract the script ZIP file first.
  5. Select all extracted files and folders in FileZilla’s local panel, then drag them to the remote traffic-exchange/ folder to upload.

Step 4: Point Your Domain to the /public Folder

The script serves everything from its public/ subfolder. Your domain’s document root must point to this folder, not to the script root.

How to do this in DirectAdmin:

  1. In DirectAdmin, click Domain Setup (under Your Account).
  2. Find your domain in the list and click on it to manage it.
  3. Look for a Public HTML path or Document Root field. Change it to the public subfolder of your script (e.g. /home/youraccount/traffic-exchange/public).
  4. Save the change.

Note: The exact location of the document root field varies by DirectAdmin version and host configuration. If you cannot find it under Domain Setup, look under Subdomain Management (for subdomains) or contact your host and ask them to set the document root for your domain to /home/youraccount/traffic-exchange/public.

If you are installing on a subdomain:

  1. In DirectAdmin, click Subdomain Management (under Your Account).
  2. Create a new subdomain (e.g. te.yourdomain.com).
  3. When prompted for the root directory, enter the public/ path of the script (e.g. /home/youraccount/traffic-exchange/public). If DirectAdmin creates the subdomain automatically with a default path, edit it afterward via Subdomain Management to update the document root.

After this step, visiting your domain in a browser should redirect you to the installer at yourdomain.com/install. If you see a blank page or a 500 error instead, check Step 5 first.


Step 5: Set Folder Permissions

The installer checks that two directories are writable. If they are not, the installer will stop on the requirements screen with a red “Not Writable” status.

  1. In DirectAdmin File Manager, navigate to your script folder (e.g. /home/youraccount/traffic-exchange/).
  2. Select the storage folder. Click Permissions in the toolbar (or right-click and choose Change Permissions).
  3. Set permissions to 755. Click Change or Save.
  4. Do the same for the bootstrap/cache folder — set it to 755.

Note: Some hosts need 775 instead of 755 if the web server runs under a different group. If the installer still reports “Not Writable” after setting 755, try 775.


Step 6: Run the Web Installer

The installer is a 7-step wizard that configures everything for you. Open your browser and visit:

https://yourdomain.com/install

Work through each step:

Step 1 of 7 — Requirements Check

The installer runs all requirement checks automatically. You will see a table showing Pass/Fail for each item.

  • All green: Click Next to continue.
  • Red failure: Fix the issue shown (usually PHP version or a missing extension via DirectAdmin’s PHP Selector), then click Re-check or reload the page.
  • Yellow warning: These are optional items (like imagick). You can proceed without fixing them.

Step 2 of 7 — Database Configuration

Enter the database credentials you created in Step 2:

  • Database host: localhost (correct for almost all shared hosting)
  • Database name: The full database name including the DirectAdmin prefix (e.g. youraccount_mysite_te)
  • Database username: The full username including the DirectAdmin prefix (e.g. youraccount_dbuser)
  • Database password: The password you set when creating the database

Click Next. If the connection fails, double-check the database name and username — DirectAdmin prefixes are a common mistake here.

Step 3 of 7 — Site Configuration

Fill in your site details:

  • Site name: The name of your traffic exchange (e.g. “My Traffic Exchange”)
  • Site URL: Your full domain with https:// (e.g. https://yourdomain.com). No trailing slash.
  • Admin email: The email address for your admin account
  • Admin username: Your chosen admin username (letters and numbers only)
  • Admin password: A strong password — store it securely
  • Timezone: Select your timezone from the dropdown (the installer auto-detects your browser timezone)
  • Language: Select your preferred language
  • Currency: Select the currency your TE will operate in

Click Next.

Step 4 of 7 — License Validation

Enter your license key from your purchase email. The installer will contact the license server to validate it.

  • Your license key is in your purchase confirmation email from trafficexchangescript.com.
  • The validation requires your server to make an outbound HTTPS connection. This works on virtually all shared hosting.
  • If validation fails, check that you have copied the key correctly and that the domain you entered in Step 3 matches your purchase.

Click Next once validation succeeds.

Step 5 of 7 — Database Migration

The installer runs all database migrations to create the tables your TE needs. This happens automatically — you do not need to do anything.

You will see a progress bar or a list of completed migrations. Wait for it to finish, then click Next.

Step 6 of 7 — Environment Setup

The installer writes your .env configuration file based on the information you provided in the previous steps. It also generates a secure APP_KEY automatically.

For shared hosting, the installer sets TE_HOSTING_MODE=shared which configures the script to use file-based caching and database queues — both of which work without Redis or any server software beyond PHP and MySQL.

Click Next.

Step 7 of 7 — Final Verification

The installer runs 7 checks to confirm everything is working:

  1. .env file exists and is readable
  2. APP_KEY is set
  3. Database connection is working
  4. Admin account was created
  5. Settings table is populated
  6. storage/ directory is writable
  7. Encryption is working

Click Run Verification. If all checks pass, the installer writes storage/installed.lock and clears framework caches. The /install route becomes inaccessible after this — you cannot re-run the installer.

If a check fails: The installer shows a remediation hint next to the failed check. Fix the issue and click Run Verification again.


Step 7: Set Up the Cron Job

The scheduler handles all background tasks — newsletters, subscription downgrades, credit expiry, site health checks, and more. Without the cron job, these tasks will not run.

Set up the cron job in DirectAdmin:

  1. In DirectAdmin, click Cron Jobs (under Your Account or Extra Features depending on your host’s layout).
  2. Click Create Cron Job or Add Cron Job.
  3. Set the schedule to run every minute:
  4. Minute: *
  5. Hour: *
  6. Day: *
  7. Month: *
  8. Weekday: *
  9. In the Command field, enter:

cd /home/youraccount/traffic-exchange && php artisan schedule:run >> /dev/null 2>&1

Replace /home/youraccount/traffic-exchange with the actual path to your script root (not the public/ folder — the root).

  1. Click Save or Add.

How to find the correct path: In DirectAdmin File Manager, navigate to your script root folder. The path shown in the address bar at the top (e.g. /home/youraccount/traffic-exchange) is what you need.

Important: This single cron entry runs all background tasks. Do not add separate cron entries for individual commands — the scheduler handles the timing for each task automatically.


Step 8: Set Up SSL

Your TE site should run over HTTPS. DirectAdmin supports free SSL via Let’s Encrypt.

  1. In DirectAdmin, click SSL Certificates (under Your Account or Advanced Features).
  2. Select the Let’s Encrypt tab.
  3. Confirm your domain is listed. If it is, click Save or Issue Certificate. DirectAdmin will obtain and install the certificate automatically.
  4. Once the certificate is issued, your site will be accessible at https://yourdomain.com.

Note: If you set APP_URL to https://yourdomain.com during the installer, SSL must be active for the site to work. If you installed without SSL and need to add it later, you will need to update APP_URL in your .env file to match your current URL.


Step 9: Configure Email Sending

Your TE site sends transactional emails (member registration, password resets, notifications). You need to configure an outgoing mail method.

Option A: DirectAdmin SMTP (via your hosting account’s mail server)

  1. In DirectAdmin, go to Email Accounts and note your hosting email credentials (host, port, username, password).
  2. Open your .env file in DirectAdmin File Manager (located at the script root, e.g. /home/youraccount/traffic-exchange/.env).
  3. Update the mail settings:

MAIL_MAILER=smtp MAIL_HOST=mail.yourdomain.com MAIL_PORT=587 MAIL_USERNAME=noreply@yourdomain.com MAIL_PASSWORD=your-email-password MAIL_FROM_ADDRESS=noreply@yourdomain.com MAIL_FROM_NAME="Your Traffic Exchange Name" MAIL_ENCRYPTION=tls

  1. Save the file.
  1. Sign up for a free account at SendGrid or Brevo (both offer free tiers sufficient for most new TE sites).
  2. Generate an SMTP API key or password in your account dashboard.
  3. Update your .env file with the credentials provided:

For SendGrid: MAIL_MAILER=smtp MAIL_HOST=smtp.sendgrid.net MAIL_PORT=587 MAIL_USERNAME=apikey MAIL_PASSWORD=your-sendgrid-api-key MAIL_FROM_ADDRESS=noreply@yourdomain.com MAIL_FROM_NAME="Your Traffic Exchange Name" MAIL_ENCRYPTION=tls

For Brevo: MAIL_MAILER=smtp MAIL_HOST=smtp-relay.brevo.com MAIL_PORT=587 MAIL_USERNAME=your-brevo-login-email MAIL_PASSWORD=your-brevo-smtp-key MAIL_FROM_ADDRESS=noreply@yourdomain.com MAIL_FROM_NAME="Your Traffic Exchange Name" MAIL_ENCRYPTION=tls

  1. Save the file.

Recommendation: External SMTP services offer much better email deliverability than hosting mail servers. If members are not receiving registration or notification emails, switching to SendGrid or Brevo usually resolves the issue.


Step 10: Log In to Your Admin Panel

Once installation is complete:

  1. Open your browser and visit:

https://yourdomain.com/admin

  1. Log in using the admin username and password you set in Step 6, Step 3 of 7.
  2. You should see the admin dashboard.

From here you can configure payment gateways, set membership levels, customise your site appearance, and manage all aspects of your traffic exchange.


Post-Install Verification Checklist

Before announcing your site to members, confirm these items work end-to-end:

  • [ ] Admin panel loads at https://yourdomain.com/admin
  • [ ] Homepage loads correctly with no PHP errors
  • [ ] Member registration completes without errors
  • [ ] Registration confirmation email is received (tests your mail config)
  • [ ] Member can log in and access the surf bar
  • [ ] At least one ad can be submitted and approved by the admin
  • [ ] Cron job runs without errors (check storage/logs/laravel.log after one minute)

If any item fails, refer to the troubleshooting section below.


Troubleshooting — Common DirectAdmin Issues

“Blank white page” or 500 error after uploading files

This usually means either the document root is not pointing at the public/ folder, or there is a file permissions problem.

  1. Check the document root: Confirm in DirectAdmin Domain Setup that the document root ends in /public, not in the script root.
  2. Check PHP version: Confirm you are running PHP 8.3+ via PHP Selector.
  3. Check file permissions: storage/ and bootstrap/cache/ must be writable (755 or 775).
  4. Check the error log: In DirectAdmin, look under Error Logs (under Your Account or Advanced Features), or open storage/logs/laravel.log via File Manager for a specific error message.

“Could not connect to database” in the installer

  • Confirm you are using the full prefixed database name and username (DirectAdmin adds your account name as a prefix).
  • Confirm the database user has full privileges on the database (set during database creation in Step 2).
  • The host should almost always be localhost on shared hosting.

“The installer keeps redirecting me back to /install”

The installer locks itself after completion by creating storage/installed.lock. If the wizard is looping, one of the final checks failed. Look at Step 7 of 7 in the installer — it shows exactly which check is failing.

“Migrations failed” or stuck on the migration step

  • Confirm the database user has CREATE, ALTER, and INDEX privileges.
  • Check storage/logs/laravel.log for a specific SQL error.

“License validation failed”

  • Check that you copied the license key exactly as shown in your purchase email (no leading or trailing spaces).
  • Confirm the domain you entered in the Site Configuration step matches the domain on your license.
  • If your server blocks outbound HTTPS connections, contact your host — this is uncommon on shared hosting.

“Cron job is not running” or newsletters / tasks not working

  • In DirectAdmin Cron Jobs, confirm the entry is listed and uses the correct script path.
  • Check storage/logs/laravel.log for scheduler-related errors.
  • Make sure you used the full path to php if needed — on some DirectAdmin hosts you may need php8.3 instead of php. If the cron runs silently with no output but tasks still do not execute, try: cd /home/youraccount/traffic-exchange && php8.3 artisan schedule:run >> /dev/null 2>&1

“I cannot access /admin after installation”

  • The admin path is set during installation and defaults to admin. Try https://yourdomain.com/admin.
  • If you changed TE_ADMIN_PATH in your .env, use that path instead.
  • Confirm the site is loading at all — if the homepage also 404s, the document root may not be pointing to public/.

PHP extensions missing — extension check fails in installer

  1. In DirectAdmin, go to PHP Selector.
  2. Look for an Extensions tab. Enable any missing extensions (pdo_mysql, gd, zip, etc.) from the list.
  3. Save and reload the installer page.

“Permission denied” errors in logs

  • In DirectAdmin File Manager, select the storage folder, click Permissions, and set it to 755 (or 775 if 755 does not work).
  • Do the same for bootstrap/cache.
  • If you still see permission errors, contact your host — some DirectAdmin servers run PHP as a different user and require specific ownership settings that only the host can configure.

For issues not listed here, check storage/logs/laravel.log first. Most errors are logged there with a specific message and stack trace that makes diagnosis much faster. If you are still stuck, contact support at support@trafficexchangescript.com with the relevant log lines and a description of what you have already tried.

— The Traffic Exchange Script Team

Traffic Exchange Script homepage after DirectAdmin installation
Your traffic exchange site running on DirectAdmin hosting.
Admin general settings after DirectAdmin installation
Configure your site settings from the admin panel after installation.

Screenshots

Traffic Exchange Script admin dashboard — overview of members, credits, traffic and revenue
After a successful DirectAdmin installation, your admin dashboard will look like this.
Previous Installation — cPanel / Shared Hosting Next Installation — VPS with Docker