Installation
PHP Car Rental installs with a web installer. You upload the files, open one address in the browser, fill in a short form and the database, demo content and configuration file are created for you.
Server requirements
| Requirement | Details |
|---|---|
| PHP | 7.4 or newer (tested on PHP 8.2) |
| PHP extensions | pdo_mysql, curl, gd, mbstring |
| Database | MySQL 5.7+ or MariaDB 10.3+, with a user that can create tables |
| Web server | Apache is recommended. mod_rewrite is needed only for SEO-friendly URLs |
| Other | HTTPS is strongly recommended, especially if you accept payments |
Install with the web installer
- Upload the content of the script folder to your hosting, for example to
public_htmlor to a sub folder. - Make sure the folders
uploaded_imagesandthumbnailsare writable (permissions 755 or 775). - Open
https://your-site.com/install/in the browser. - Enter the database data: host, database name, user, password and a table prefix (the default
carrental_is fine). The installer creates the database if your MySQL user is allowed to. - Enter the website name, the administrator e-mail, username and password.
- Keep Install demo content ticked if you want 12 sample cars, reviews, bookings and news to see the site working. You can remove them later.
- Click Install now. The tables are created and
config.phpis written automatically. - Delete the
installfolder from the server.
Always delete the install folder after the installation. It contains an SQL file and the installer script that should not stay on a live website.
Alternative: import the SQL file by hand
If you prefer phpMyAdmin: create an empty database, import install/PHPCarRental.sql, then edit config.php (see below). The dump contains demo content and the administrator admin with the password admin123. Change this password immediately in Home → My account (My account (password and language)).
The config.php file
| Variable | Meaning |
|---|---|
$DOMAIN_NAME | Optional full address used in e-mails and payment return links, for example www.example.com/rent. Leave empty to auto-detect. |
$DBHost, $DBUser, $DBPass, $DBName | MySQL access data. |
$DBprefix | Prefix of all table names. Keep it if you share the database with another script. |
$DEBUG_MODE | Set to false on a live website to hide PHP and SQL error details. |
$ProductName | Name shown in the admin panel header. |
After the installation
- Open your website and the admin panel at
/ADMIN/and log in. - Follow the quick start checklist to brand the site and set up payments.
- Installing in a sub folder works without changes; the script detects its own path.
- To use SEO-friendly URLs, enable them as described in General settings.
Last updated