Free

Free coded apps to suit all. No sign up, no email, usable offline, updates when I can, feedback welcome. Send feedback

How-to

How to upload your exported database site to your web host

After exporting, Base by Zaweba offers Upload with FTP by Zaweba if it is installed. Then import the SQL, fill in the settings and run setup.

How to upload your exported database site to your web host

If FTP by Zaweba is installed, Base by Zaweba offers to upload the site with it straight after you export. Before or alongside the upload, you create a MySQL or MariaDB database on your host, import the SQL that Base wrote, and fill in the site's settings file. Then you run the setup page once to make the first login, and delete it.

The export comes with a README listing the same steps, so you always have them to hand.

What the export gives you

File > Export to website writes a folder. Inside are schema.sql, which creates your tables in MySQL or MariaDB with their keys, defaults and rules, an optional data.sql with your current records, and the PHP site itself. The site needs PHP 8.2 and has no framework to install.

After the export, Base shows a few choices: Open in Server by Zaweba and Upload with FTP by Zaweba (each only if that app is installed), Open the folder, and the README.

Try it on your PC first

Server by Zaweba lets you run the site on your own computer before it goes anywhere near the internet. Check that the list pages search and sort, that lookups show as dropdowns, that sub-forms appear as child lists, and that your rules give the messages you wrote. Mistakes are cheaper to find here.

Setting up the database on the host

Log in to your hosting control panel and create a new MySQL or MariaDB database with a user that can use it. Note the database name, the user name, the password and the server name your host gives you.

Import schema.sql into the new database, usually through your host's database tool. If you want your existing records online too, import data.sql afterwards.

Open lan_data.php from the exported folder in a text editor and fill in the database details you noted. This is how the site finds its database. If you export again later after changing the design, Base keeps your filled-in lan_data.php rather than overwriting it.

Uploading the files

Upload the site folder to your web space. With FTP by Zaweba that means connecting to your host over FTP, FTPS or SFTP, with your local files and the server side by side, and putting the folder in place. Its Sync and Get Newer show what will move before anything does, which is reassuring the second time round, when only a few pages have changed.

Any FTP program will do the job, but having it offered by Base right after the export saves hunting for the folder.

Finishing the install

Visit setup.php on your site in a browser and create the first user. Then delete setup.php from the server. Leaving it on a live site could let someone else run it, so this step matters.

Log in on the login page and try adding, editing and deleting a test record. Delete asks first, as it does on the desktop.

Before you share the address

Everyone who logs in can change everything, since the exported site has one kind of user. Give logins only to people you trust with the whole database. Make sure your host serves the site over HTTPS.

The site already uses prepared statements, CSRF tokens on every form, escaped output, hashed passwords and a limit of 10 failed logins per address per 15 minutes. Keep it up by exporting again from Base by Zaweba whenever you change the design, and uploading the changed files.