Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Migrating CPG 1.6 to new host  (Read 1946 times)

0 Members and 1 Guest are viewing this topic.

justinbowser

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Migrating CPG 1.6 to new host
« on: January 24, 2020, 11:26:24 pm »

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?
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1578
Re: Migrating CPG 1.6 to new host
« Reply #1 on: January 25, 2020, 01:21:03 am »

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...
Logged

justinbowser

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Migrating CPG 1.6 to new host
« Reply #2 on: January 25, 2020, 01:26:15 am »

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?
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1578
Re: Migrating CPG 1.6 to new host
« Reply #3 on: January 25, 2020, 02:27:12 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.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4730
    • Windsurf.me
Re: Migrating CPG 1.6 to new host
« Reply #4 on: January 25, 2020, 03:28:55 pm »

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

justinbowser

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Migrating CPG 1.6 to new host
« Reply #5 on: October 31, 2020, 09:43:51 pm »

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?
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4730
    • Windsurf.me
Re: Migrating CPG 1.6 to new host
« Reply #6 on: October 31, 2020, 10:33:19 pm »

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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

justinbowser

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Migrating CPG 1.6 to new host
« Reply #7 on: October 31, 2020, 11:56:28 pm »

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

justinbowser

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Migrating CPG 1.6 to new host
« Reply #8 on: November 01, 2020, 12:02:36 am »

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!
Logged

justinbowser

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Migrating CPG 1.6 to new host
« Reply #9 on: November 01, 2020, 02:00:14 am »

The move looks like it was successful and everything is good to go!  Thanks, Phill, for your help.
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 19 queries.