Topic Closed
Flynn
18 Posts

If I set up a locally installed version of gp|Easy on my computer, what must I note if I want to copy the installation to the server later?

Or even if I want to move my installation from server A to server B?

Cheers!

6 years ago#7965

juergen
1.5K Posts
58.4K Downloads
16 Plugins
design, web development & visual effects

Hi Flynn,

Password Algo:
If your local server uses PHP 5.5+ your Password Algorithm may be set to "password_hash". If your live host uses an earlier PHP version, you will have to use sha512. See your Admin Preferences (yourHostURL/Admin_Preferences). Choose sha512 if you are uncertain.

Subdirectories:
If you are installing gpEasy in your local server's root directory or using a VirtualHost so you're accessing you local gpEasy site with http://localhost/ (http://127.0.0.1/) everything is fine. The port number does not matter. So even if your local URL is for example http://127.0.0.1:8080/ everything is fine.
If you're using a subdirecory locally and the server root on the live host, i'ts going to be a little complicated: The problem is that gpEasy stores ressource URLs (images/downloads) with absolute paths like <img src="/data/_uploaded/image/pretty_me.jpg" /> which will be <img src="/myLocalWebsiteSubdirectory/data/_uploaded/image/pretty_me.jpg" />. I would try to avoid that.
Setting up a VirtualHost on your local server depends on what environment you are using. I would recomment to try it.
 

E.g.could be as simple as…


Create an entry in your system's host file
(It's C:\Windows\System32\drivers\etc\hosts on Windows, /etc/hosts on most UNIX-like systems. I believe it's /private/etc/hosts on OS X.) To edit hosts on Windows you need to start Notepad or whatever text editor you prefer as Administrator. On UNIX-likes you need to sudo or be root. OS X will ask for the admin password. In case of doubt google how to do it on you OS)

Simply add

127.0.0.1 mylocalgpeasy01.com

... to the hosts file, save it and try
ping www.mylocalgpeasy01.com
in the console/command prompt to check if it worked.


Create a Virtual Host pointing to the directory where you copied your gpEasy files in your local server environment. Basically Apache vHosts look like…

<VirtualHost *:[YourServersPortNumber]>
DocumentRoot "/path/to/server/wwwroot/myLocalGpEasySite01"
ServerName www.mylocalgpeasy01.com
ServerAlias mylocalgpeasy01.com
<Directory "/path/to/server/wwwroot/myLocalGpEasySite01">
allow from all
Options -Indexes
AllowOverride All
</Directory>
</VirtualHost>

and reside somewhere in /etc/apache2/sites-available and also need a symblink in /etc/apache2/sites-enabled/ - but it largely depends on your OS/distribution and server environment. XAMP/WAMP/LAMP setups have their very own locations. You'll have to google it or read the docs.

Once done you need to restart Apache to make the vHost work - meaning Apache resolves the domain name in the HTTP request accordingly.

URL Rewriting:

If you're uncertain whether your live server supports url rewriting just do not enable "Hide /index.php" in gpEasy -> Settings -> Permalinks
You can always try to enable it when you put your website online. Most webhosts have mod_rewrite installed by default.

 

Once you have managed to run your gpEasy site locally this way (without using subdirectories in your URL) it's quite easy to deploy the site on the live server:
Just copy all the files to your webhost, make the /data directory (and subdirs/files) writable and you're done.
To deploy the site you can also use the methods described here Documentation > Moving To Another Server

HTH,

J

Edited: 6 years ago#7966

Flynn
18 Posts

Hello juergen,

thanks for your fast and helpful feedback!

Cheers!

6 years ago#7967

juergen
1.5K Posts
58.4K Downloads
16 Plugins
design, web development & visual effects
You're welcome!
The hosts+vHost thing will also help with other CMS since most of them store some absolute paths.
I really wish we could ret rid of it but i'ts not trivial.
6 years ago#7968

Topic Closed

 

News

elFinder 2.1.50 in Upcoming Release
12/28/2019

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1
8/12/2017

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

HH-Support

Company located in T├│rshavn, Faroe Islands. * Webpage Design * Consultant & Provider of a wide range of programs for visually impaired and dyslextics.

Find out more about our Provider Spotlight

Log In

  Register