Nazaudy, a spark in your curious mind

How to create an offline copy of your Joomla 4 website

Let's get our hands dirty and get started with how to create an offline copy of your Joomla 4 website, so you can test on it new upgrades, extensions, etc, before putting them live on your production site. This current article about Joomla 4 is partially based on my previous article regarding the now nearly no-longer supported Joomla 3 that you can find here: https://www.nazaudy.com/how-to-create-an-offline-copy-of-your-joomla-3-website Some of the steps are similar but not the same, so let's get started!

  1. Create a VMware Workstation
  2. Software to install
  3. Install Joomla 4
  4. Database Configuration for Joomla 4
  5. Install Akeeba Backup
  6. Restore future updates using Akeeba kickstart

 

1. Create a VMware Workstation

If your computer is powerful enough (you have enough CPU cores, memory, fast storage, etc), I strongly recommend to create a Virtual Machine on it so you can run Joomla 4 in isolation. That gives you the advantage that, if something goes wrong with the VM in the future, you can just bin it and create a new one. I have explained how to create a VM in this other link, please follow it up if you don't have a VM dedicated to Joomla 4 on your system: https://www.nazaudy.com/how-to-create-an-offline-copy-of-your-joomla-3-website#Z_SetupVM

 

2. Software to install

On that VM, the one that will host our offline copy of Joomla 4, install the following components:

XAMPP will be the replacement for our web hosting provider, so after you install it please ensure the both Apache and MySQL modules of XAMPP are configured to auto-start

How to create an offline copy of your Joomla 4 website XAMPP autostart

 

3. Install Joomla 4

Here is where the fun starts! Visit this link and download into your VM the same Joomla version that you are running on your host provider: https://downloads.joomla.org/cms/joomla4 On my case, I'm running right now Joomla 4.2.3, so I'll download that particular version on my VM

Once you have download it and unzipped, copy & paste the contents into the root of the "https" folder of the XMAPP app

Joomla 4 website

Then visit that folder on the local Apache an the new installation wizard for Joomla 4 will start: https://loalhost/Joomla_4.2.3/installation/index.php Follow the wizard and start a new site, entering the same logon details that you use to logon to your production Joomla

Joomla 4 installation

 

4. Database Configuration for Joomla 4

First of all, have a look at the Database settings found under your production Joomla 4 >> Global Configuration >> Server tab, and take not of the following:

  • Database Name
  • Database username & password
  • Randox prefix

Once you got those details, visit the phpMyAdmin and create a blank new database using the same details, adding as well the DB user with full access to the Database

After that, visit the installation wizard and enter those details to access the Database, which at the moment will be all blank, of course

 

How to create an offline copy of your Joomla 4 website DB details

Click on "Install Joomla" and you should receive this order message saying Joomla is happy to see you back! :)

Congratulations Your Joomla site is ready

 

5. Install Akeeba Backup

On your offline Joomla 4, visit System >> Extensions >> Install >> Install from Web and install Akeeba Backup, a must have app for every Joomla deployment

How to create an offline copy of your Joomla 4 website using Akeeba Backup

 

6. Restore future updates using Akeeba kickstart

You got it! 😃Using Akeeba Backup on your production Joomla site, make a copy of it by clicking on the "Default Backup Profile", and then restore the current and future updates of your production site using Akeeba kickstart into the offline Joomla 4. Never mind the name of the actual folder of your original offline installation, for example: I update my production site from Joomla 4.2.3 to Joomla 4.2.9 and was able to restore the production version of Joomla 4.2.9 into the XAMPP folder of 2.26

Download the Akeeba Kickstart from here: https://www.akeeba.com/download/akeeba-kickstart/8-0-0.html

To do the Akeeba restore, copy the "kickstart.php" file into the root of the "Joomla_4.2.3" folder

How to create an offline copy of your Joomla 4 website kickstart extraction method

 

For the next window, get the details of your "Main Database" connection from your live version of Joomla >> Global Configuration >> Server tab >> Database entry. If all goes well you should be presented with this lovely ending message:

Database restoration completed

If after the restore you have this error message: "Call to undefined function JSpeed\image\createtofromstring(), then visit the JSpeed Panel >> Edit Configuration >> Image optimisation >> And disable Image Optimisation

 

London, December 2022

 

References

 

Comments powered by CComment