Installation
Uploading the files, the database, install.php that activates the licence before writing anything, main domain, sub-domain or sub-folder, what the installer writes, the .htaccess and Nginx.
An empty database, the package, your licence key and install.php - about five minutes. The installer activates the key with lcpanel.com before it writes anything, so a refused key leaves the folder exactly as it was.
Before you start
- Your licence key,
BXP-XXXX-XXXX-XXXX-XXXX, from your account on lcpanel.com. The key is tied to the domain you install on. See The licence key. - A database. In cPanel open MySQL Databases: create a database, create a user with a strong password, add the user to the database with All privileges.
- A server that meets the Requirements.
1. Upload the files
Upload the BoxPuff ZIP into the folder of your domain (usually public_html) with File Manager → Upload, then Extract. The files must sit directly in that folder: public_html/index.php, not public_html/BoxPuff/index.php. Make sure the hidden .htaccess came along (File Manager: Show hidden files).
Main domain, sub-domain or sub-folder - all three work. Nothing in BoxPuff assumes it lives at /. Put it in public_html/box/ and the site answers at https://example.com/box; every link is built from the folder index.php lives in. The .htaccess uses relative rewrite rules, so no RewriteBase is needed.
2. Run the installer
Open your site in the browser. Until it is installed, every page sends you to install.php.
Server requirements. The first card lists PHP, PDO MySQL, cURL, JSON, mbstring, GD, Zip, FTP, and whether the root and the files/, uploads/, cache/ and logs/ folders are writable (the installer makes them when they are missing). Rows marked Missing must be fixed; Optional rows can wait. The Install BoxPuff button stays disabled until the required rows are green.
The form. Four cards:
| Card | What to fill in |
|---|---|
| Database | Host (localhost on most hosts), Port (3306), Database name, Database user, Database password. |
| Your site | Site name; Site URL without a trailing slash (https://files.example.com or https://example.com/box); Site e-mail (the from address); Language - English or বাংলা (Bengali) - the default language of the site. Tick Put the demo advertisements in every ad position to see what goes where (replace them later; see Advertising). |
| Licence | Licence key. Tick Allow an insecure connection to the License Center only when the installer says the server cannot check the certificate (an old CA bundle); ask your host to update it afterwards. |
| The first administrator | Username (3-30 letters, numbers, dots, dashes, underscores), E-mail, Password (at least 8 characters). |
Press Install BoxPuff. The installer checks the form, connects to the database, activates the licence, and only then writes. If something is wrong the page lists it under Please fix the following and nothing has been written.
Done. The last page shows the site address, the licence package and who it is licensed to. Open the admin panel signs this browser in once, within twenty minutes; See the site opens the home page. After that, sign in at /login (or /admin).
What the installer writes
config.php-DB_HOST,DB_PORT,DB_NAME,DB_USER,DB_PASS, a randomBP_SECRETthat signs download links, upload tickets and cookies (never change it on a live site), and commented lines forBP_URL(pin the site to one address),BP_NODE_KEY(for a Direct file server),BP_DEBUGandBP_LICENSE_INSECURE_SSL. The file carries the author header like every other file.- The tables, all starting with
bp_, fromincludes/schema.php. - Settings: your site name, URL, e-mails, language, and every default of every settings group.
- Something to begin with: the local file server (
files/), the account packages Free User, Temp User, Moderator, Admin, Premium and Premium Plus with prices, two download pages, the footer pages, a first What's New entry, the faruk.bd demo advertisements when you ticked the box, and the free plugins switched on. - Your administrator account (on the Admin package) and the licence record.
- Folders
files/,uploads/tmp,uploads/avatars,uploads/logos,uploads/thumbs,uploads/zips,uploads/ads,uploads/backups,cache/,logs/, plus an.htaccessinuploads/that refuses to run scripts. installed.lock, last of all. From then oninstall.phponly sends visitors to the home page.
After the install
- Delete
install.php. It cannot run again whileinstalled.lockexists, but removing it is tidier. - Never delete
installed.lock- without it every page goes back to the installer. - Protect
config.php(644). The shipped.htaccessalready refuses to serveconfig.php,installed.lockand.envto a browser. - Add the cron line shown under Admin → System Tools → Background Tasks - one line, every minute. See Scheduled jobs.
- Walk through the panel: The admin panel.
The .htaccess
The package's .htaccess does five things: turns off directory listings; sends every address that is not a real file or folder to index.php (leaving assets/, uploads/, theme and plugin assets alone); forbids running anything under uploads/ or files/ that ends in .php, .phtml, .pl, .py, .cgi, .sh or .phar; denies config.php, installed.lock, .env and the Composer files; and sets caching headers and generous PHP limits for mod_php.
Nginx has no .htaccess. Add to the server block:
location / { try_files $uri $uri/ /index.php?$query_string; }
location ~ ^/(uploads|files)/.*\.(php|phtml|pl|py|cgi|sh|phar)$ { deny all; }
location ~ ^/(config\.php|installed\.lock|\.env)$ { deny all; }
If clean addresses are not possible at all, the site falls back to index.php?r=account/edit style links by itself (setting pretty_urls).
A development copy on Windows
BoxPuff runs under PHP's built-in server too. Keep display_errors off and look at the error log instead: the script is written so that a normal page view writes nothing to it. Set BP_DEBUG to true in config.php only while you chase a problem, never on a live site.