Copying over old site to new host Topic is solved

General questions relating to Joomla! 3.x. Please consider the availability of third-party templates and extensions when deciding which Joomla version to use.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Post Reply
Markxy10
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Oct 31, 2017 8:29 pm

Copying over old site to new host

Post by Markxy10 » Fri Jul 20, 2018 9:16 am

Hi all,

Since the old server host was shut down I am migrating to a new host. But I am getting a http 500 error although everything seems fine.
I have the old exports (the site's .tar file and the .sql for mySQL).

I followed this guide: https://docs.joomla.org/Copying_a_Joomla_website
And did everything in the exact same order, edited the configuration.php file and copied over site files to the server (and set the copied subfolder to be the source for the domain in the hosting dashboard).

I focused on main stuff like:
dbtype = 'mysqli' <- changed from 'mysql', because the phpmyadmin page shows "PHP extension: mysqli"
host = 'mysqlhost56' <- got from host dashboard, also on the phpmyadmin page
user = *username* <- same as myphpadmin login
password = *password* <- same as myphpadmin login
db = *username*+suffix <- this is the db where I executed the sql file later in myphpadmin

I changed log_path and tmp_path too, but these are lower priority.

Then went to the phpMyAdmin page and imported the sql file in the same db. Ran successfully with no errors.

And when going to the site I get a http error 500 -which is pretty generic and I can't pinpoint anything with this.


Do you guys have any Ideas on what can cause this problem?
Or what can I try to fix it?

I've done this procedure multiple times, and tried changing the config file parameters, but no dice.
The site was working fine on the old host before the export.

Thanks in advance! :)
Mark

P.S - my other post is pretty much the same thing, but this situation is completely different. Different site, different files, different hosts. (major difference is that this time I have the sql file)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 35510
Joined: Sat Apr 05, 2008 9:58 pm

Re: Copying over old site to new host

Post by Webdongle » Fri Jul 20, 2018 9:31 am

http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

Markxy10
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Oct 31, 2017 8:29 pm

Re: Copying over old site to new host

Post by Markxy10 » Fri Jul 20, 2018 9:41 am

Webdongle wrote:Akeeba is the easiest way https://docs.joomla.org/Copying_a_Joomla_website#Akeeba
Thanks, but I thought I needed to run the Akeeba backup to produce the .jpa file while the site was still active.
Can I still use akeeba with only the .tar file and the .sql file?

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3295
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Copying over old site to new host

Post by ribo » Fri Jul 20, 2018 9:53 am

Put in configuration.php error reporting "development" instead "default" and check if you see another error
chat room spontes : http://www.spontes.com

User avatar
fcoulter
Joomla! Ace
Joomla! Ace
Posts: 1684
Joined: Thu Sep 13, 2007 11:39 am
Location: UK
Contact:

Re: Copying over old site to new host

Post by fcoulter » Fri Jul 20, 2018 9:58 am

You are correct, the biggest problem here is that the error message is so generic that it is very hard to diagnose. You can try the following:-

create a file in a text editor, eg notepad, called php.ini, put as the contents:-

Code: Select all

error_reporting = E_ALL
display_errors = On
put this in the root folder of you site, it *might* result in a more understandable error message.

Or you can use the forum post assistant viewtopic.php?f=714&t=793531

This will display the last PHP error and a lot of diagnostic information as well, which you may find useful. You can post the results here if you wish to get support here.
http://www.spiralscripts.co.uk for Joomla! extensions
http://www.fionacoulter.com/blog my personal website
Security Forum moderator :: VEL team member
"Wearing my tin foil hat with pride"

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 35510
Joined: Sat Apr 05, 2008 9:58 pm

Re: Copying over old site to new host

Post by Webdongle » Fri Jul 20, 2018 9:59 am

If you dont have access to the old site you cant use Akeeba.

I would suggest (in a separate folder to a different database) install Joomla. Then move the configuration.php to the root and edit the database logins and remove the folder name from the paths.

You could set up Wamp on your PC and get the backup working on there then use Akeeba to copy the site to the server.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
fcoulter
Joomla! Ace
Joomla! Ace
Posts: 1684
Joined: Thu Sep 13, 2007 11:39 am
Location: UK
Contact:

Re: Copying over old site to new host

Post by fcoulter » Fri Jul 20, 2018 10:05 am

Put in configuration.php error reporting "development" instead "default" and check if you see another error
Yes you can do this too, although I would use "maximum" rather than "development" (which will probably generate too many messages related to Joomla development and not really relevant). The "maximum" setting should display any PHP warnings and error messages, which is what you want.
http://www.spiralscripts.co.uk for Joomla! extensions
http://www.fionacoulter.com/blog my personal website
Security Forum moderator :: VEL team member
"Wearing my tin foil hat with pride"

Markxy10
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Oct 31, 2017 8:29 pm

Re: Copying over old site to new host

Post by Markxy10 » Fri Jul 20, 2018 10:06 am

ribo wrote:Put in configuration.php error reporting "development" instead "default" and check if you see another error
Now the error is:

Code: Select all

Fatal error: Cannot use Joomla\String\String as String because 'String' is a special class name in /home/la02/30561794/aja/libraries/vendor/joomla/utilities/src/ArrayHelper.php on line 11
And I'm a bit suprised by this as it seems like a Joomla generated file which users don't edit.

E: This is from the ArrayHelper.php file:

Code: Select all

<?php
/**
 * Part of the Joomla Framework Utilities Package
 *
 * @copyright  Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */

namespace Joomla\Utilities;

use Joomla\String\String;

/**
 * ArrayHelper is an array utility class for doing all sorts of odds and ends with arrays.
 *
 * @since  1.0
 */
 ...

User avatar
fcoulter
Joomla! Ace
Joomla! Ace
Posts: 1684
Joined: Thu Sep 13, 2007 11:39 am
Location: UK
Contact:

Re: Copying over old site to new host

Post by fcoulter » Fri Jul 20, 2018 10:20 am

I suspect that your new site uses PHP 7, and you are using an old version of Joomla which is not compatible. Try reducing the PHP version to 5.6 then update your site.

See https://github.com/joomla/joomla-cms/issues/8817
http://www.spiralscripts.co.uk for Joomla! extensions
http://www.fionacoulter.com/blog my personal website
Security Forum moderator :: VEL team member
"Wearing my tin foil hat with pride"

Markxy10
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Oct 31, 2017 8:29 pm

Re: Copying over old site to new host

Post by Markxy10 » Fri Jul 20, 2018 11:07 am

fcoulter wrote:I suspect that your new site uses PHP 7, and you are using an old version of Joomla which is not compatible. Try reducing the PHP version to 5.6 then update your site.

See https://github.com/joomla/joomla-cms/issues/8817
Thank you!

It seems I have to contact my website host to make the downgrade.
Will keep this place posted.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 35510
Joined: Sat Apr 05, 2008 9:58 pm

Re: Copying over old site to new host

Post by Webdongle » Fri Jul 20, 2018 12:12 pm

http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

Markxy10
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Oct 31, 2017 8:29 pm

Re: Copying over old site to new host

Post by Markxy10 » Fri Jul 20, 2018 2:27 pm

It seems like the script doesn't work, an error from the webhost comes up. Saying that a script was executed without permission.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 35510
Joined: Sat Apr 05, 2008 9:58 pm

Re: Copying over old site to new host

Post by Webdongle » Fri Jul 20, 2018 2:37 pm

Some Hosts don't allow it. Who is your Host? Do they have help files for php version?
Methinks using Wamp on localhost to get things working might be a good idea ... you have control over the (localhost) server settings then.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
fcoulter
Joomla! Ace
Joomla! Ace
Posts: 1684
Joined: Thu Sep 13, 2007 11:39 am
Location: UK
Contact:

Re: Copying over old site to new host

Post by fcoulter » Fri Jul 20, 2018 3:52 pm

Yes I agree, WAMP is good, you can easily select the PHP version. You can get the current version of your site running on PHP 5.6, update it to the latest release of Joomla, then upload the updated version to your new site.
http://www.spiralscripts.co.uk for Joomla! extensions
http://www.fionacoulter.com/blog my personal website
Security Forum moderator :: VEL team member
"Wearing my tin foil hat with pride"

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 35510
Joined: Sat Apr 05, 2008 9:58 pm

Re: Copying over old site to new host

Post by Webdongle » Fri Jul 20, 2018 3:58 pm

Akeeba for creating a backup
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3295
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Copying over old site to new host

Post by ribo » Fri Jul 20, 2018 8:00 pm

To put every code in .htaccess is not work in every host as every host server is may configured different. If you dont want to as to your host to make downgrade in php you can copy your joomla local (as you know) with uniform server as with this you can have and php 5.6 and php 7 and php 7.1 in one install and use php 5.6 there and after update your joomla to the latest version and your extensions and template too, and then you can have it in php 7 in your live host.
chat room spontes : http://www.spontes.com

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3295
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Copying over old site to new host

Post by ribo » Fri Jul 20, 2018 8:03 pm

Ofcource i hope that your joomla is not hacked as we know that is an old version live too much time
chat room spontes : http://www.spontes.com

User avatar
sozzled
Joomla! Champion
Joomla! Champion
Posts: 5619
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Copying over old site to new host

Post by sozzled » Fri Jul 20, 2018 8:36 pm

Markxy10 wrote:I followed this guide: https://docs.joomla.org/Copying_a_Joomla_website
And did everything in the exact same order, edited the configuration.php file and copied over site files to the server (and set the copied subfolder to be the source for the domain in the hosting dashboard).
Hmmm ...

I've been using Joomla for 10 years and, I must confess, this is the first time I've actually studied this guide. **Ouch!!** The "guide" assumes knowledge of how to make filesystem and database backups and how to restore those things. While the guide theoretically should work, it was written over 10 years ago, a lot has changed in that time and it is probably the source of more questions on the forum than is worth using.

I don't think there are any exceptions among us who are experienced J! users, who copy J! websites from place to place on an almost daily basis, who would go to the trouble of using that guide. To be honest, if one were to follow the guide, it would take more than 2 hours of fiddling around to sort things out. We, who are experienced J! users, use Akeeba Backup and Kickstart and, for a typical website, we're talking less than 30 minutes to backup a website and restore it elsewhere.

I've thought about editing the guide and placing a piece of advisory text at the top of it to read something like:
This tutorial assumes technical competence in using FTP, management of remote file systems (including how to back them up and restore them) and database export/import. Although the methods described in this tutorial may be useful for advanced users, the most common and simple method to copy a Joomla website from one location to another is to use Akeeba Backup which is available for download from the Joomla Extensions Directory.
And then I would advise people to skip the first few hundred lines and go directly to https://docs.joomla.org/Copying_a_Joomla_website#Akeeba.

That's what I would do. My problem is that I don't have sufficient hours in my day to edit the Wiki article (and remember how to use ambox templates and stuff like that).

So there's the difference: over two hours to do it the old-fashioned way or less than 30 minutes to do things with Akeeba. Your choice ... ;)
https://www.kuneze.com/blog
Former member of Kunena project team
If you think I’m wrong then say “I think you're wrong.” If you say “You’re wrong!”, how do you know?

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3295
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Copying over old site to new host

Post by ribo » Fri Jul 20, 2018 9:11 pm

sozzled wrote:
And then I would advise people to skip the first few hundred lines and go directly to https://docs.joomla.org/Copying_a_Joomla_website#Akeeba.
It s your opinion. Maybe it s faster but it s not one way. Some one may wants to copy his joomla with files and mysql and change some credentials. With file manager of cpanel and phpmyadmin it s fast too. And the problem of OP is not that he couldnt copy his joomla with this way but the problem was that his joomla was incompatible with the php version of his new host. The same problem would have and with akeeba back up.
chat room spontes : http://www.spontes.com

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3295
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Copying over old site to new host

Post by ribo » Fri Jul 20, 2018 9:18 pm

sozzled wrote:
Markxy10 wrote:
So there's the difference: over two hours to do it the old-fashioned way or less than 30 minutes to do things with Akeeba. Your choice ... ;)
With cpanel and file manager i make less than 30 minutes with old-fashioned way in a not big joomla site. If you use ftp to do it it s a different thing.
chat room spontes : http://www.spontes.com

User avatar
sozzled
Joomla! Champion
Joomla! Champion
Posts: 5619
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Copying over old site to new host

Post by sozzled » Fri Jul 20, 2018 9:21 pm

I understand the unusual, unique situation in this case and, where there wasn't Akeeba backup media available to begin with, the old-fashioned method may be the only workable approach. This, notwithstanding, reinforces the perception among some members of the community that websites will never fail or they never need to be moved elsewhere until something happens and they're forced into taking action.

I'm sorry if some of what I wrote was off-topic. The principal point to be noted (for others who encounter this topic) is to create backup media that's portable and easily restored in the event of the real likelihood that, one day, their website goes pear-shaped.

It's written in every book that I own and read on the subject of website management for the need to understand how to backup a website and how to restore it. This is a subject that requires whole chapters of books to discuss the issue. It's not something that can be easily answered with a few quick posts flown around on an internet discussion forum.
https://www.kuneze.com/blog
Former member of Kunena project team
If you think I’m wrong then say “I think you're wrong.” If you say “You’re wrong!”, how do you know?

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3295
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Copying over old site to new host

Post by ribo » Fri Jul 20, 2018 9:31 pm

Note that i i didnt said that akeeba back up is not good. Instead it s very good and very fast and also many users require it too. But the problem of OP was not the back up and restore, that s why was my previous post and also all the tutorial of joomla for copy your joomla https://docs.joomla.org/Copying_a_Joomla_website is usefull.
chat room spontes : http://www.spontes.com

User avatar
sozzled
Joomla! Champion
Joomla! Champion
Posts: 5619
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Copying over old site to new host

Post by sozzled » Fri Jul 20, 2018 9:45 pm

If the tutorial was so useful (comprehensive and self-explanatory) then we wouldn't be having this discussion in the first place. I understand the peculiar, unusual and unique circumstances of this case. Having a backup (in whatever method was used to create it) is better than not having a backup at all.

I've had requests from people to rescue their websites that have vaporised and the only "backup" was a snapshot of the site at the wayback machine (http://archive.org/web/) ... true!
https://www.kuneze.com/blog
Former member of Kunena project team
If you think I’m wrong then say “I think you're wrong.” If you say “You’re wrong!”, how do you know?

Quiniela10
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Jul 20, 2018 10:18 pm

Re: Copying over old site to new host

Post by Quiniela10 » Fri Jul 20, 2018 10:32 pm

thanks for the information, an me also serves me for the future

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 35510
Joined: Sat Apr 05, 2008 9:58 pm

Re: Copying over old site to new host

Post by Webdongle » Fri Jul 20, 2018 10:50 pm

sozzled wrote:If the tutorial was so useful (comprehensive and self-explanatory) then we wouldn't be having this discussion in the first place. ...
Spot on there.

Big problem is that many users who create websites don't understand the basics like folder structure and paths.

Anyway https://docs.joomla.org/Copying_a_Joomla_website has been changed to show Akeeba as the 'common method'. Yes there are other methods but Akeeba is by far the most common among the experienced volunteers in the forum. It's 'piece de resistance' is that it places the whole site into one file that installs just like the Joomla full package. This makes it much more flexible than other methods as well as the install process being familliar to newbies who have installed Joomla.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
sozzled
Joomla! Champion
Joomla! Champion
Posts: 5619
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Copying over old site to new host

Post by sozzled » Fri Jul 20, 2018 10:56 pm

Thanks, @Webdongle. Yep, that'll do it! Cheers :)
https://www.kuneze.com/blog
Former member of Kunena project team
If you think I’m wrong then say “I think you're wrong.” If you say “You’re wrong!”, how do you know?

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 35510
Joined: Sat Apr 05, 2008 9:58 pm

Re: Copying over old site to new host

Post by Webdongle » Fri Jul 20, 2018 11:02 pm

Yep until someone changes it back because they think they know better.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

Markxy10
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Oct 31, 2017 8:29 pm

Re: Copying over old site to new host

Post by Markxy10 » Mon Jul 23, 2018 12:28 pm

Hi again!

The host changed the PHP version to 5.6 and everything worked!
Thanks, all of you.

Your further discussion was interesting as well and I will install Akeeba, also upgrade J! version so I can upgrade PHP, etc.


Post Reply

Return to “General Questions/New to Joomla! 3.x”