0

For some psychotic reason, I've taken over hosting and managing a Joomla-based site for a non-profit I'm involved with. Unfortunately, the former admin is uncooperative, so I'm flying blind. I also have near-zero experience with Joomla, natch.

I was given a tarball of the site by one of the organization's board members who is tech savvy, but I don't know how to go about installing it -- Simply untarring it into the appropriate directory produces a "Database Error: Unable to connect to the database:Could not connect to MySQL" error on loading the site. According to the Joomla documentation, there are three reasons for this error:

"1) Sometimes you will see this message if MySQL has stopped running on your server. Your server administrator may temporarily turn MySQL off to run maintenance utilities. In such circumstances, your site will likely return shortly.
2) Your database user has been deleted. If this is the case, you will need to recreate your database user with the same username and password that existed when you first installed Joomla. Use your domain control panel to administer this or contact your server administrator.
3) Your database username or password has changed."

The configuration.php file provides the database $user, but I don't know what password was used when this user was created. Is there any way to recover this site as it appeared on the previous host? Or can I tell the board that we're hosed, and start over with a CMS that I know better? (Note: The reason they want to keep the existing Jooomla-based system is they evidently sunk some costs into some of the plugins.)

2
  • Have you got the MySQL database content from the original host as well? You'll need to create a local MySQL database and import the previous tables I should imagine, at the very least. Jun 12, 2012 at 17:47
  • @EightBitTony I don't know -- Where does Joomla put the database file(s)? Jun 12, 2012 at 17:57

2 Answers 2

1

Did the tarball contain the database as well as fileset?

If not you'll need to get a dump of the database, set up a new database for the site using phpMYAdmin, and then import the old database to the new.

Once you've done that, update the configuration.php file with proper connection info for the new database (db server (usually localhost), db user, and db user pw).

6
  • Thanks! Where do I look for the database? Does Joomla have a default location? Jun 12, 2012 at 18:00
  • The database is located wherever the previous hosting company keeps databases. If you have CPanel access for where the site was originally hosted you can access phpMyAdmin and export the database from there.
    – TJ Baker
    Jun 12, 2012 at 18:02
  • Is the site still live with the other hosting company? If so, you could install Akeeba Backup and move it very easily, as the bakcup will contain the database as well as fileset and restore to your new local with ease:
    – TJ Baker
    Jun 12, 2012 at 18:09
  • Unfortunately I don't have access to the previous host, which is why I think we're hosed. I did, however, find an XCloner backup in an administrator subdirectory, so I'm going to see if I can get the data out of it. (Having never used XCloner either, this should be entertaining.) Jun 12, 2012 at 18:11
  • I've not used XCloner myself, but if the database is there you should be good to go.
    – TJ Baker
    Jun 12, 2012 at 18:21
1

To move a Joomla website, you need a compress tar of the entire directory for the Joomla installation and you need a MySQL dump. On the new system you uncompress the tar file in the directory for the web server. Then create a new MySQL database. Then change the configuration.php file to reflect the new exact name of the MySQL database and change the MySQL database user and password. Also change the log area for the directory path. Then load the newly created MySQL database with the MySQL dump.

If you don't know the password for the 'admin' login, you need to reset it, which can be done through MySQL.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .