Documentation: General Docs Product documentation, plugin reference, and online help
Note that this package does not include the
scss source files used for the theme. Please purchase the original Full HTML version to customize your own copy.
This will guide you through the basic installation of SmartAdmin PHP v4. Some of the guide below may not apply to this copy of SmartAdmin PHP. If you find any issues or want to request a feature, visit us at our Support Forum.
Before you install SmartAdmin, it's important to check that your server meets the requirements. To run SmartAdmin, you will need:
- Apache (with mod_rewrite enabled)
- PHP 7.1+ with the following extensions:
- MySQL 5.6+ or MariaDB 10.0.5+
- SSH (command-line) access to run Composer
At this stage, it's not possible to install SmartAdmin by downloading a ZIP file and uploading the files to your web server. This is because SmartAdmin uses a dependency-management system called Composer which needs to run on the command line. This doesn't necessarily mean you need a VPS. Some shared hosts give you SSH access, through which you should be able to install Composer and SmartAdmin just fine. For other hosts without SSH, you can try workarounds such as Pockethold.
SmartAdmin uses Composer to manage its dependencies and extensions. Before installing SmartAdmin, you will need to install Composer on your machine. Afterwards, run this command within the root folder where
composer.json is located:
While this command is running, you can configure your web server. You will need to make sure your webroot is set to
/path/to/your/smartadmin/public, and set up URL Rewriting as per the instructions below.
When everything is ready, navigate to your site in a web browser and follow the instructions to complete the installation.
Make sure you store sensitive and private information in a secure location and not accessible publicly. DO NOT include the config file in your repository.
SmartAdmin PHP uses the package vlucas/phpdotenv to store sensitive and private information like database credentials. The package includes an
.env file that you can modify as needed.
If you wish not to use
.env, feel free to comment in
root.php:19-20 and modify the constants as needed.
// load configuration
// $dotenv = Dotenv\Dotenv::create(ROOT_PATH, '.env');
// set the constant DB_HOST for example.
Required for some features like the built-in REST API server.
SmartAdmin includes a
.htaccess file in the
public directory – make sure it has been uploaded correctly. If you're using shared hosting, confirm with your provider that
mod_rewrite is enabled and
.htaccess files are allowed. If you're managing your own server, you may need to add the following to your site configuration:
By default SmartAdmin's directory structure includes a
public directory which contains only publicly-accessible files. This is a security best-practice, ensuring that all sensitive source code files are completely inaccessible from the web root.
However, if you wish to host SmartAdmin in a subdirectory (like
yoursite.com/smartadmin), or if your host doesn't give you control over your webroot (you're stuck with something like
htdocs), you can set up SmartAdmin without the
public directory by following the steps below.
- Move all the files inside the
.htaccess) into the directory you want to serve SmartAdmin from
.htaccess:125-128to protect sensitive resources.
const.phpand update the
define('PUBLIC_PATH', __DIR__); // ...
init.utils.phpand any other files that's requiring
const.phpand use the appropriate path:
require_once 'const.php'; // ...
SmartAdmin PHP includes Database functionality using the package lodev09/php-models to abstract your data. An SQL file is included within this package. It is located in the
Follow the installation below to get started.
Provided that you met the MySQL server requirements, follow these steps:
mysqlclient and create the database.
CREATE DATABASE smartadmin_db;
Import the sql file.
mysql -u root -p smartadmin_db < db/smartadmin_db.sql
Configure the database credentials in the
DB_HOST=localhost DB_USER=root DB_PASSWORD=YOUR_PASSWORD DB_NAME=smartadmin_db
This package comes with a flexible file structure that can be easily used for small to large scope projects. This section will explain app's file structure and how to adapt it to your project.
- (public files)
- (util files)
Authored by @lodev09.
Product Support Customer support for SmartAdmin for PHP
All support questions related to HTML and/or CSS will be honored. Issues that are encountered on the Seed versions of specific flavors of SmartAdmin are covered by their respective authors, but will be limited to HTML and/or CSS issues. If you need assistance with a technical issue that is currently not covered by the FAQ, you will need to have purchased a Full license of that flavor and contact the respective author for further assistance. The Full version links will be added to the Flavors page once they are made available.