Updating to a new version
System Update, backups of database and code, uploading the new files, db_update.php, purging caches, plugin and theme zips, and going back.
An update is a backup, new files over the old ones, and one visit to db_update.php. Your settings, members, files and the folders that hold them are never in the package, so nothing of yours is touched.
Finding out
Admin → System Tools → System Update shows the Installed version, the Database schema version (with a run db_update.php badge when it lags behind), the Newest at the License Center with the entry's title and date, Last checked, and the licence state. Check for updates asks the License Center's changelog now; the cron does it too, and a newer version puts a notice at the top of every admin page. Recent changes lists the latest What's New entries.
Step by step
- Back up. Admin → System Tools → Backups → Backup Database writes
database_v1_0_0_<date>.sqland Backup Code writescode_v1_0_0_<date>.zipintouploads/backups/(a folder the web server refuses to serve). Download both somewhere safe. The files on the file servers are not included; back them up with your host's tools. - Download the new version from your account at lcpanel.com (Download at the License Center on the System Update page).
- Upload it over the installation and extract.
config.php,installed.lock,files/,uploads/,cache/,logs/and the plugins and themes you added are never in the package, so they stay. Shipped plugins and themes underplugins/andthemes/are updated with the core. - Open
/db_update.phpin the browser as an administrator (you are sent to the admin sign-in if needed). It prints what it does, line by line: the tables a newer version added, each migration that has not run yet (tagged inbp_migrations, so each runs exactly once), missing settings defaults and seeds, and every plugin's ownupgrade(). It is safe to run again and again. From SSH:php db_update.php. - Back on System Update, press Purge caches (file cache, schema cache, settings and language caches) - or the Purge cache button in the admin top bar, which also resets PHP's opcache and the Direct file servers (Purge Cache).
- Open the public site and the file manager once; look at System Logs - the error log should have gained nothing.
A Direct file server gets the same files; db_update.php runs once on the main site only, because they share the database.
Updating from 1.0.0 to 1.1.0
Follow the steps above: back up, upload the 1.1.0 update zip over the installation, open /db_update.php. Your settings, members and files stay. What db_update.php does for this version, line by line in its report:
- Tables and columns: the two message logs (
bp_sms_log,bp_whatsapp_log) and the phone columns on users that SMS & WhatsApp and Two-factor Sign-in use. It reports them under Tables made. - Step
1.1.0-brand(runs once, tagged inbp_migrations): the brand colour became BoxPuff blue,#2563eb. Every colour setting still on the first release's purple (#5b50e6or#7c73f0) - Brand colour, Admin panel accent and a theme's accent or primary colour - is moved to the blue. The report says brand colour updated on N setting(s). A colour you chose yourself is never touched, so a site that already set its own brand colour keeps it. - Adult-content options removed: the Adult content keywords setting, the different adverts for adult content switch, the adult advert variants and their VAST addresses are deleted, and any file or advertisement that was flagged adult is cleared. BoxPuff 1.1.0 has no adult-content options at all - no file flag, no keyword list, no advert variant and no report reason (Advertising). The report says adult-content settings removed.
- The home page's cached numbers are emptied so the new home page draws fresh ones.
What you will notice afterwards: the new logo and blue on the public site, the admin panel's grouped menu (The admin panel), the new pages SMS & WhatsApp and the template galleries (Templates), and the two new premium add-ons, the Two-factor Sign-in plugin and the Nova theme, which appear in your plugin and theme lists and work once their addons are on your licence (The licence key). A site that was installed on http and later given a certificate now links its stylesheets and scripts with the visitor's own scheme, so a page that lost its design after the move to https is whole again.
Updating from 1.1.0 to 1.2.0
The same steps: back up, upload the 1.2.0 update zip over the installation, open /db_update.php as an administrator. Settings, members, files, config.php, uploads/ and every plugin you added stay. There is no migration step in this version; db_update.php does the following and prints it:
- Tables and columns: the table
bp_message_templates(the SMS / WhatsApp wording of SMS & WhatsApp → Templates) under Tables made, and the columnphone_marketingon users if it is missing. The plugins make their own on the first page that needs them:bp_pg_wallet_ordersfor the mobile wallets of Payment Gateways, the phone columns of Newsletters, andbp_currency_orderspluscurrencyon users for Multi Currency. - Defaults: the new settings, among them the whole SEO & Analytics group (SEO & Analytics), get their default values; nothing you set is changed. The built-in SMS / WhatsApp templates are filled in the first time you open the Templates tab.
- Two new free plugins, Multi Currency and Google AdSense. A free plugin that is new to a site is switched on once by
db_update.php(the line Seeds counts it) and never again, so a plugin you later switch off stays off. If either is off on your site, switch it on at Admin → Extensions → Plugins (Manage Plugins). Neither changes anything until you set it up: Multi Currency needs a currency with a rate, Google AdSense a publisher id. - Direct file servers: upload the new files to them too,
node.phpabove all, so that Purge Cache can reach them (Purge Cache).db_update.phpruns on the main site only. .htaccess: the new file has the rule that makes/api/open the documentation. If you edited yours, addRewriteRule ^api/?$ index.php [L,QSA]afterRewriteEngine On(API and MCP).
After it, press the new Purge cache button in the admin top bar. What you will notice: mobile wallets among the payment methods, a currency picker once you add currencies, Preview buttons and advice cards on Advertising, the Templates tab and a phone option on newsletters, a flag language menu and nested plugin menus in the admin panel, the Overview tab of Two-factor Sign-in, and Run now buttons in the Media Converter queue.
Plugins and themes
A plugin from the License Center is a zip with plugin.php at its top (or inside one folder). Admin → Extensions → Plugins → Add Plugin uploads it; a newer zip of an installed plugin replaces its files and keeps its settings and tables. Switching a plugin on runs its install; switching it off keeps its data; Delete removes the files of a plugin that is off. Themes go through Admin → Extensions → Themes → Add Theme the same way. Both uploaders refuse archives without the manifest file and ignore anything but the allowed file types.
Backups
The Backups page lists every backup with its type, size and date, with Download and Delete. A database backup is a plain SQL dump (DROP TABLE IF EXISTS + CREATE TABLE + INSERT for every bp_ table, leaving out session, download-tracker and geo-cache rows); restore it with phpMyAdmin or mysql < file.sql. A code backup is a zip of everything except files/, uploads/, cache/ and logs/.
If something goes wrong
- A white page after the upload - a file did not arrive whole; upload the package again, then run
db_update.php. db_update.phpreports FAILED on a step - read the message (usually a privilege the database user lacks), fix it and run the file again; finished steps are skipped.- The panel says the schema lags -
db_update.phpwas not run or did not finish. - Going back - put the code backup's files over the installation and import the database backup. Files in
files/and on the other servers were never touched.
Tips
- Read the What's New entry before updating; it names anything that needs a hand.
- Update the main site first, then the Direct file servers, within the same hour.
- Keep three recent backups and delete the rest; a database dump of a big site is large.