Developer tools
Cron jobs, .htaccess, redirects, environments and deploying code.
12 articles
Automation
- How to create a cron job in DirectAdmin
Schedule scripts and commands to run automatically with DirectAdmin cron jobs: the schedule fields, the command line, and handling output.
- Cron schedule syntax explained (with examples)
Read and write cron schedules: the five fields, *, ranges, lists and step values, plus copy-ready examples for common schedules.
- Running PHP scripts from cron: paths, output and common mistakes
Write PHP scripts that run reliably from cron: the PHP binary path, working directory, includes, time limits, locking and logging.
- WP-Cron: replacing it with a real cron job Filed under WordPress
How WordPress’s built-in scheduler works, why scheduled tasks can run late on quiet sites, and how to run WP-Cron from a DirectAdmin cron job.
- Cron job not running Filed under Troubleshooting
Diagnose a cron job that doesn’t seem to run: wrong schedule, relative paths, PHP binary, permissions, silent errors and overlapping runs.
Web server configuration
- What is .htaccess? A practical guide
What .htaccess files do, where they apply, the rules people use most, and how to recover quickly when one breaks your site.
- Redirects with .htaccess: copy-ready examples
Working .htaccess redirect rules for single pages, whole folders, domain changes, HTTPS and www — with notes on 301 vs 302 and avoiding loops.
- Creating custom 404 and error pages
Replace the plain server error pages with your own 404, 403 and 500 pages using .htaccess, and make sure a 404 still returns the right status code.
- Adding security headers with .htaccess
Add HTTP security headers — HSTS, X-Content-Type-Options, Referrer-Policy, frame protection and Permissions-Policy — safely with .htaccess.
- Viewing website statistics and logs in DirectAdmin Filed under DirectAdmin
Where to find access logs and error logs for your domain, how to read a log line, and which log to check for which problem.
Deploying code
- Hosting static sites and JavaScript framework builds
Deploy the output of Astro, Hugo, Eleventy, Jekyll, or a React, Vue or Next.js static export to Traxio, with routing rules for single-page apps.
- Deploying a PHP application (Composer, Laravel and frameworks)
How to deploy a Composer-based PHP app such as Laravel or Symfony on shared hosting: building locally, keeping code outside public_html and environment files.
- Storing configuration and secrets outside public_html
Keep database passwords, API keys and SMTP credentials out of the web root with config files above public_html, .env files and protective .htaccess rules.
- How to connect to your hosting with SSH
Log in to your Traxio account’s command line over SSH on port 26628, set up key-based login, and the everyday commands that are useful on shared hosting.
- Deploying a website with Git
Clone a repository into your account with DirectAdmin’s Git feature and pull updates to deploy, keeping secrets and build artefacts out of the repo.
- Can I run Node.js, Python or Ruby apps on Traxio? Filed under Getting started
Node.js and Python apps run on Traxio, with several versions of each. How they fit shared hosting, what to expect, and why Ruby isn’t supported.
- Sending email from your website reliably Filed under Email deliverability
Why contact forms and website notifications go missing, the difference between PHP mail() and authenticated SMTP, and how to set up a sending address.
- Connecting a PHP application to your database Filed under Databases
The connection details for Traxio databases and working examples with PDO and mysqli, including safe queries and keeping credentials private.
- Using a subdomain as a staging site Filed under Files & FTP
Set up a private copy of your site on a subdomain to test updates, PHP versions and redesigns without risking the live site.