PHP Car RentalUser Manual Visit PHP Car Rental →
Getting Started

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

RequirementDetails
PHP7.4 or newer (tested on PHP 8.2)
PHP extensionspdo_mysql, curl, gd, mbstring
DatabaseMySQL 5.7+ or MariaDB 10.3+, with a user that can create tables
Web serverApache is recommended. mod_rewrite is needed only for SEO-friendly URLs
OtherHTTPS is strongly recommended, especially if you accept payments

Install with the web installer

  1. Upload the content of the script folder to your hosting, for example to public_html or to a sub folder.
  2. Make sure the folders uploaded_images and thumbnails are writable (permissions 755 or 775).
  3. Open https://your-site.com/install/ in the browser.
  4. 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.
  5. Enter the website name, the administrator e-mail, username and password.
  6. 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.
  7. Click Install now. The tables are created and config.php is written automatically.
  8. Delete the install folder 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

VariableMeaning
$DOMAIN_NAMEOptional full address used in e-mails and payment return links, for example www.example.com/rent. Leave empty to auto-detect.
$DBHost, $DBUser, $DBPass, $DBNameMySQL access data.
$DBprefixPrefix of all table names. Keep it if you share the database with another script.
$DEBUG_MODESet to false on a live website to hide PHP and SQL error details.
$ProductNameName 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