ZenphotoCMS Forum
Moving website - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Moving website (/thread-13868.html)



Moving website - jwaltrip4 - 09-08-2023

Have website running on one of my servers. Want to move it to new server

  1. pointed new apache to existing website folder
  2. stopped existing website on old server
  3. Set up apache website on new server
  4. New server has Mysql, set it up just like on old server
  5. Reset removed all files in zp-data folder, copied fresh from zenphoto 1.6 zip file. Same with setup files.
    Note I am not running HTTPS

When I run setup, it prompts for database info. I give it the info. It then returns: This site can’t be reached test.waltrips.com refused to connect.

  • it looks like zenphoto is trying to connect to https:

if I type the http:/test/waltrips.com, it says the the gallery is being upgraded




Moving website - acrylian - 10-08-2023

We have detailed infos about moving sites here: https://www.zenphoto.org/news/moving-and-changing-existing-installations/

If you didn't move any content, you doing a fresh install.

If the site is trying to connect via https and you didn't enable it that is probably your server/domain/subdomain being setup for https already. The usual behaviour is to force it so only https is accessbile. Good for security and avoiding duplicated content because the http variant is technically a separate addresss. That forcing is usually a server option so check you server setup, especially if you did all this yourself.




Moving website - jwaltrip4 - 10-08-2023

Understand on HTTPS vs HTTP security. I am only going to use local for testing.

Is there some setting in Zenphoto that requires https? That I need to change? the conf file in apache is not set up for https, only http




Moving website - acrylian - 10-08-2023

Okay, the local testing you didn't mention previously. https is set in the ZP config file. There is also an option on the backend but that is also tied to the config file.




Moving website - jwaltrip4 - 10-08-2023

OK... I found the setting. it was already set to http

I restored the database from the other server...

if I run http://xx.xx.com/zp-core/admin.php,
or
http://xx.xx.com/zp-core/setup.php

I get back:
https://test.waltrips.com/zp-core/setup/index.php?autorun=admin

and it says site cant be reached.

Sorry, not an apache expert... what could be causing it to switch to https?




Moving website - acrylian - 10-08-2023

There might be an option "server_protocol" in the options table but actually the config setting overrides that. It's basically only used on changing the options on the backend which then updates the config file in turn.

The only other ideas are:

  • the server forces https. Cannot help with that as Ihave no actual knowledge about Apache setup. Never setup any server myself and let webhosts do that to use their interfaces for these settings. Zenphoto does not force that via htaccess but perhaps you have something custom here.
  • The browser setting forces https.



Moving website - jwaltrip4 - 10-08-2023

where is the options table?




Moving website - acrylian - 10-08-2023

In the database where all tables are? ;-)




Moving website - jwaltrip4 - 10-08-2023

Also,... when I look at the "Gallery is undergoing and Upgrade" the "Please Return later" link is https://test.waltrips.com....

Isn't Zenphoto creating that link?




Moving website - acrylian - 10-08-2023

Yes if you don't have a custom static siteupgrade page within /plugins/site_upgrade.




Moving website - jwaltrip4 - 10-08-2023

Ung... I will have to test recovery at some point.... this was messy, possiblly beacuse it is not an exact copy of original.

It is working now, thanks for the help

For recovery.... would this be as simple as duplicating all same directory structure, restore all zenphoto and album folders, use same apache config, and restore database?




Moving website - acrylian - 10-08-2023

"Recovery" or duplicating is basically the same as moving as described on the link above. The really import part is the order first to copy the albums folder then the database because the database mirrors the filesystem.

It will work with db first too but then you loose all db entries for images and albums because no albums means empty albums/images table so they would be imported freshly.




Moving website - jwaltrip4 - 10-08-2023

OK...

  1. backup old zenphoto database
  2. create new empty zenphto database on new server
  3. Copy zenphto files to www folder (/var/www/test.waltrips.com, etc)
  4. restore Albums folder
  5. Restore Database to empty database
  6. Run setup

?




Moving website - acrylian - 11-08-2023

Yes, as documented on the link above. You can also copy the cache folder so sized images do not need to be recreated.




Moving website - jwaltrip4 - 11-08-2023

OK.... Here is what I did:

  1. stopped web on source
  2. stopped web on target
  3. backed up Zenphoto db on source
  4. restored zenphoto db to target
  5. copied all files from cms.waltrips.com (srouce) web to test.waltrips.com (target)
  6. reset security on target
  7. enable we on target
  8. re-rean setup
  9. refreshed database
  10. refreshed metadata
  11. all looks good, so I connect to web (http://test.waltrips.com)
  12. looks good, except page I have defined (Welcome) on cms.waltrips.com is not on test.waltrips.com
  13. Galleries look like they are there.... but when I select one I get:


    Not Found
    The requested URL was not found on this server.

Apache/2.4.41 (Ubuntu) Server at test.waltrips.com Port 80

====================================
Note that this is 1.5.9


debug.log:
{18003:Fri, 11 Aug 2023 10:24:52 GMT}
NOTICE: A non well formed numeric value encountered in /mnt/Disk1/www/test.waltrips.com/zp-core/setup/class-setup.php on line 307
setup::versionCheck called from index.php [636]




Moving website - acrylian - 11-08-2023

So what url does such an album have? Modewrite or not? If modrewrite and it does not work, the htacccess is wrong or you have not setup your server correctly.




Moving website - jwaltrip4 - 11-08-2023

modrewrite is checked.

and thanks... that got it, copied .htaccess from root of source and all is well.
thanks.
will make sure to add to instructions.

Next step is to upgrade




Moving website - jwaltrip4 - 15-08-2023

Ok... Moved Website as previously stated.

Just tested upgrade and went perfect. thanks for the help!




Moving website - acrylian - 15-08-2023

Great!