Before getting too deep into creating articles, a proof-of-concept for moving a Joomla! site to another server is a good idea. This is using the free version of Akeeba Backup for Joomla.

Joomla! doesn't appear to have any way of moving articles from one site to another, or at least if it exists I've not found it yet. For now copying the whole site from one host to another is a workable approach, and for the initial upload it's actually ideal so while I've only got a few articles written it makes sense to check the Akeeba backup tool works as hoped.

I'm going to use my original sandpit server for this test, and the target will be the freshly built Test server as both are expendable if the worst happens (and yes, I do have backups of both so the worst will just be an annoyance). And the whole point of sandpits is to try things out before you let them anywhere near real working systems.

The official Akeeba documentation is here: https://www.akeeba.com/support/akeeba-backup-3x.html

The process itself is quite simple:

  1. Install Akeeba Backup on the source system
  2. Create a backup
  3. Transfer the backup to the target systems - fix up the Apache2 config as needed
  4. Upload the kickstart.php to the target too
  5. Trigger the kickstart.php script via the browser
  6. Run the installer that it creates to extract files and recreate the database
  7. Log in as Super Administrator and make sure everything works

It really does seem quite simple doesn't it?

Install Akeeba Backup on the Source System

Download the Akeeba Backup for Joomla 4 from the Akeeba downloads site. At the time of writing the latest version was 9.5.0. Also download the Kickstart too from the same page. Keep both zip files somewhere safe for now.

As a Super Administrator login to the Source Joomla system and go to System > Install : Extensions

Extension installation page

The Akeeba Backup should be a single zip archive file called something like pkg_akeebabackup-9.5.0-core.zip and all you need to do is drag that into the middle of the install screen or click to browse to wherever you downloaded the file to. Installation takes a few seconds and once complete a nice friendly banner will confirm all went well

Akeeba installed confirmation

Create a Backup

On the main menu under Components we should now have a new entry: Akeeba Backup for Joomla!

Akeeba control panel

The default location for the backup file is [Joomla Directory]/administrator/components/com_akeebabackup/backup and you can change this via the Configuration button under Basic Operations if you want to.

The defaults are all quite sensible and just work for what we need at least, so just click the big green Default Backup Profile button and wait a few minutes while it creates the backup archive for you.

Backup running

Once complete click on Manage Backups and you can download the backup from here if you want to.

Transfer the backup to the target systems

For this exercise I'm using /srv/jooclone on my target VM as the Joomla Directory. This is created with 755 www-data:www-data permissions as per the Joomla installation preparation.

Since this is going to and from Ubuntu VMs under my full control I just started an SSH session on the source, changed to the directory where the backup was saved and used scp to copy it to the target machine and dropped it into the Joomla Directory. I could have also just copied it to a local /srv/jooclone directory too and run the test off the sandpit host.

Either way, on the target machine we need to create an Apache2 config to point at our new site. I just copied joomla.conf from the source and saved it to /etc/apache2/sites-available/jooclone.conf on the target and adjusted the ServerName, DocumentRoot and Directory parameters as appropriate.

<VirtualHost *:80>
   ServerAdmin This email address is being protected from spambots. You need JavaScript enabled to view it.
     DocumentRoot /srv/jooclone/
   ServerName target.example.com

     ErrorLog ${APACHE_LOG_DIR}/joomla-clone-error.log
     CustomLog ${APACHE_LOG_DIR}/joomla-clone-access.log combined

     <Directory /srv/jooclone/>
            Options FollowSymlinks
            AllowOverride All
            Require all granted
     </Directory>
</VirtualHost>

And then activated the site in the usual way with a2ensite jooclone.conf followed by systemctl restart apache2.

Upload the kickstart.php to the target system

We also need to extract the kickstart.php from the kickstart archive we downloaded earlier and upload it to the Joomla Directory on the target. And set it's permissions to 644 www-data:www-data

Trigger the kickstart via the browser

To trigger the kickstart.php script you need to call it explicitly from the browser e.g http://target.example.com/kickstart.php and it opens with a handy reminder of what kickstart is. I like the comment about having read the manual too.

Kickstart initial info

Press ESC to close the message and we're into the main Kickstart screen.

Kickstart main screen

Kickstart comes with sensible defaults and it detects the archive file we uploaded. It gave a warning about still running PHP 7.4 but otherwise all is good. There are additional sections for tuning if your really need to, but we can ignore them in this setup.

All we need to do is click the Start button and wait a few seconds while it extracts the files

Kickstart extracting files

This only took a few seconds to run, and if you look in the Joomla directory on your target server you'll see all the files have been extracted. The .jpa file is still there too, but this gets removed at the end.

Kickstart run installer

 

Run the installer

Once extraction is complete, it's time to run the installer to recreate the Joomla on the target by clicking the Run the Installer button.

Installer screen 1

we have green ticks across the board, which is good so we can click Next. There is an additional info below this to confirm where you've created the backup from too.

Installer connection information

Now we need to update the connection details for the database on the target host, and we can also change the table prefix too. As this is just a proof of concept I'm going to change it to copypoc_ as the prefix.

If you want to reuse an existing prefix the advanced options will let you chose between dropping all tables in that prefix, or just the ones that would be replaced.

Click Next at the top of the screen when you're ready and after a few seconds the database will be restored. If you have phpMyAdmin installed you'll be able to confirm this easily.

Database restored

Click Next Step.

Now we get to change the target site parameter if we want to.

Installation site parameters

In this case I've changed the site name to Joomla Clone and updated the email address and sender to match. I've also updated the temporary directory and log directory to be under the site root as well. All the others I've left alone for now. Click Next when you're ready.

Installer complete

And finally the installation is complete so we can close the browser window and return to the kickstart page, which will have updated.

Kickstart cleanup

When you click the Clean Up button the kickstart.php and the uploaded archive will be deleted.

Kickstart complete

And that's it. Click the button to open your site. If you now login as an administrator you should see nothing much has changed apart from the address and the site name.

Clone is running

If this was a real move I'd now be giving everything a good check over, renaming site specific user and updating passwords. As this was a proof of concept I'll just delete the files from the /srv/jooclone directory, the copypoc_* tables from the database and revert the Apache2 config back to the original joomla.conf site.