Migrating CPG 1.6 to new host Migrating CPG 1.6 to new host
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Migrating CPG 1.6 to new host

Started by justinbowser, January 24, 2020, 11:26:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

justinbowser

Now that I have my CPG back up and running I feel I should move it to a different host.  Would the easiest thing be to just do a fresh CPG 1.6 install on the new host and somehow pull over the content or is there a regular migration utility/process?

ron4mac

Copy the CPG directory from one host to the other.
Export the database and import it on the new host.
Change the database values in include/config.inc.php as needed.
Done...

justinbowser

Thanks, I'll give that a try and see what happens.  This is after I do a fresh install of CPG on the new host, right?

ron4mac

Quote from: justinbowser on January 25, 2020, 01:26:15 AM
This is after I do a fresh install of CPG on the new host, right?
Nope. If you just copy the entire CPG directory from the current host to the new host, all the files will be there with no need to do an install. You just need the database transferred and the config file set to point to the database.

phill104

It is a mistake to think you can solve any major problems just with potatoes.

justinbowser

I know this is going to make me look like the world's worst procrastinator but I just this morning got around to trying this move.  Been up in an off-grid cabin in the mountains of SE OK since the virus started and just came back to civilization a couple of weeks ago!

Here's what I have done:

1.  I zipped up the entire Coppermine installation on the old host and extracted it on to my new host.
2.  Exported the database to a file through phpMyAdmin.
3.  Created a new mysql database on the target host.
4.  Imported the backup file into the new DB on new host.
5.  Modified the config.inc.php file with the new DB name, DB username, and password.

When I try to launch the moved Coppermine Gallery I get:

Coppermine critical error:
Unable to connect to database !

MySQLi said: :

I did notice that when I was updating the config.inc.php file that the existing password looked like it was encrypted and the password I replaced it with was in plain text.  Is there a switch I need to set somewhere to accept a plain test PW or is something else FUBAR?

phill104

You simply need to fully check your MySQL credentials. One or more of them is incorrect. If you have access to phpmyadmin create a new user with access to only the cpg database. Then use those credentials in coppermine. Be sure to run update.PHP when you have the connection sorted.
It is a mistake to think you can solve any major problems just with potatoes.

justinbowser

Can I use MySQL Databases to create user or does it need to be done through phpMyAdmin?

justinbowser

Never mind.  Thanks for the sanity check!  I must have fat-fingered something the first three times I tried but this time the planets were in alignment and all is well!

justinbowser

The move looks like it was successful and everything is good to go!  Thanks, Phill, for your help.