Support

Akeeba Backup for Joomla!

#35484 Changing domains home directory

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by on Saturday, 07 August 2021 20:17 CDT

bdecker

Please look at the bottom of this page (under Support Policy Summary) for our support policy summary, containing important information regarding our working hours and our support policy. Thank you!


EXTREMELY IMPORTANT: Please attach a ZIP file containing your Akeeba Backup log file in order for us to help you with any backup or restoration issue. If the file is over 2Mb, please upload it on your server and post a link to it.


Description of my issue:

 

I am in the process of upgrading a joomla site running akeeba at subdomain hirsch.cloudstreetportal.com.

To do this, I created a new subdomain called hirsch53.cloudstreetportal.com and built out my new site there.  Akeeba also works fine here.

Once I was done building out and testing the hirsch53.cloudstreetportal.com site, I decided to update the home directory for subdomain hirsch.cloudstreetportal.com to point at the directory where hirsch53.cloudstreetportal.com lives.

I did this and everything worked for Joomla.

I also updated some of the paths in joomla's config settings (configuration.php) and checked php.ini and ,htaccess.

However, when I go into the back-end after updating the subdomains home directory, Akeeba warns that the default directory is in use and that the php version is out of date.  When I try to update a profile in akeeba's admin, I can't access all of the configuration settings.

So, I ended up renaming directories and re-establishing the original home directory for hirsch.cloudstreetportal.com.

Akeeba then ran fine and I could access all of the configuration settings.

I'm not dissatisfied with this approach but wanted to pass this along in case there is an issue with the first approach that I was attempting to use.

 

thanks again,

Bruce

 

nicholas
Akeeba Staff
Manager

You can change the subdomain or even the domain name of the site just fine. When I'm developing I actually do that a lot (see my blog post about using Expose).

Changing the root directory of a site is a bit more involved. You need to change the configuration.php, .htaccess and php.ini/.user.ini while being very careful that you don't remove what is needed and you don't mistype anything. I can do that practically in my sleep; I've done that many a time and due to the nature of the software I've been writing the past 16 years and my involvement with server setup and site development the past 20 years I know the pitfalls and how to avoid them. If you've done that less than ten times in your life chances are you may have missed something.

I suspect a few different things may have happened when you made your switcheroo.

I suspect your Output Directory was set up as a full path, not a path using the variables for the site's root and root parent. Since you changed both the subdomain name AND the site's root path that full path became invalid, pointing to a location that no longer exists. When this happens the output path reverts to the default output directory.

Regarding the Configuration page, it's generated by JavaScript. I have a strong suspicion that you may have made a mistake in your configuration.php and/or .htaccess files, breaking JavaScript on the page.

Moreover, the changes you made in .htaccess removed the custom rule your host added to apply a newer PHP version which is why Akeeba Backup very correctly warned you that you are using an old PHP version. PHP 7.3 becomes end-of-life in December 2021. You need to upgrade it to PHP 7.4 or 8.0 as soon as possible.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

bdecker

Thank you Nicholas.  Great support as usual.  I'll make another attempt on another site I am upgrading and follow your guidelines to see if I have success.  I understand this is not an Akeeba issue and so If I report back on this ticket, it will be just informational.  As for PHP upgrade, I've be waiting for another component I use to release a version for 7.4+ and plan to upgrade as soon as that is available.  Thanks again!

 

Bruce

 

nicholas
Akeeba Staff
Manager

Correct. It's not an Akeeba Backup issue, it's a matter of configuring Joomla, your web server and the PHP version it runs.

Here's a simpler way to do what you're trying to do.

In all backup profile make sure you use paths relative to [SITEROOT] and [ROOTPARENT]. This makes the output directory portable i.e. it will still be valid even if you change your site's root (assuming that any path relative to [ROOTPARENT] will still be correct).

Create a new backup profile of the type “All configured databases (archive file)”. Exclude all database tables. Take a backup. This generates a very minimal backup archive, about half a megabyte.

After doing the switcheroo restore this minimal backup archive. The restoration script will modify the Joomla configuration for you.

During that mini-restoration tell the restoration script to replace the .htaccess file in the site's root with the Joomla default.

When it's done, go to your hosting control panel and make sure that your site is using PHP 7.3.

At this point most everything should work. If you have any third party extensions which store absolute paths or absolute URLs you'll have to change them. If not, you're done.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!