GetSimple Support Forum

Full Version: Development/Deployment Questions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

Sorry if this is in the wrong place. I am wondering what others are doing for dev and deployment of their GS sites. Right now I am currently working with MAMP and deploying via FTP. I know the deploy may not be the best solution. 

Specifically I'd like to know and know how to get around the url issue when developing locally and pushing to production. Right now my urls locally look like http://localhost/mysite/page but you know when you push you have to run through all the pages checking links. Im interested in what others are doing....

thanks!!
You could use a hosts file or redirects to use the target domain locally
There are also a couple mogration plugins around
(2015-10-31, 08:25:05)shawn_a Wrote: [ -> ]You could use a hosts file or redirects to use the target domain locally
There are also a couple mogration plugins around

thanks Shawn for the response. I have tried the virtual hosts redirect and it worked pretty good. 

and no sooner than i click to the 'extend' theres a migrate plugin :/
A very simple solution to that URL problem, that I have previously used, is to simply open the pages.xml file and search & replace "localhost" with my domain.
You would have to do this to all page .xml files not everyone knows how to do advanced global search replace
(2015-11-03, 23:01:57)shawn_a Wrote: [ -> ]You would have to do this to all pahe .xml files not everyone knows how to do advanced global search replace

Yes. Thats what I have been doing plus opening all the pages and doing a global replace. 

I'm also trying to add my development site onto git and then pulling from there to the live server. Just lots of intricate details when developing Big Grin
MAMP ? Meaning Mac ? Then your system should be unix-like enough to solve the problem with one line in the terminal:

Code:
cd /path/to/GetSimple/data/pages;for i in *.xml;sed -i.bak 's#http://localhost/#http://real-address/#g' "$i";done

What this does: It loops over all the XML-files and uses the stream editor 'sed' on each file to substitute 'http://localhost/' with 'http://real-address/' globally (that's the 'g' after the substitution-command, it would only do one substitution per line without it). The '-i' option makes sed do 'in place editing' instead of dumping the edited stream to standard output, the '.bak' after the '-i' tells it to make backups with the extension '.bak'.

Replace '/path/to/GetSimple/' and 'real-address' with appropriate values. As always before doing batch-changes on important data: make a backup.

H.
For Windows users this looks like a good search and replace tool (tested):

https://findandreplace.codeplex.com/

stand alone (no installation needed), command line support, not bloated.
Like i said though there are like three plugins to do this some in real time some permanently
Thank you everyone for your advice!
One might be just a script that is included in a thread.
Here's another one I made (but didn't upload to Extend): Fix Site URL
Im using migrate. Seems to be very useful!!! But I will look at the others you have offered. Thank you Carlos.

Perhaps I should of searched the plugins first instead of the forum. Seems there is an abundant number of plugins dealing with this. Im sure others are using.
Thanks to datiswous - he posted the list :-)
(2015-11-07, 01:37:01)Carlos Wrote: [ -> ]Thanks to datiswous - he posted the list :-)

Yes thanks! Datiswous Wink
Someone make that a thread we can sticky
or add this to the Plugins Guide in the wiki.
perhaps but this stuff changes over time.
(2015-11-07, 03:33:57)Carlos Wrote: [ -> ]or add this to the Plugins Guide in the wiki.

I just did that.