Posts: 166
Threads: 24
Joined: Jul 2012
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!!
Posts: 6,267
Threads: 182
Joined: Sep 2011
You could use a hosts file or redirects to use the target domain locally
There are also a couple mogration plugins around
Posts: 166
Threads: 24
Joined: Jul 2012
2015-11-03, 06:52:42
(This post was last modified: 2015-11-03, 06:54:16 by lnickel.)
(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 :/
Posts: 76
Threads: 7
Joined: Jun 2015
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.
Posts: 6,267
Threads: 182
Joined: Sep 2011
You would have to do this to all page .xml files not everyone knows how to do advanced global search replace
Posts: 166
Threads: 24
Joined: Jul 2012
(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
Posts: 2
Threads: 0
Joined: Nov 2015
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.
Posts: 1,247
Threads: 82
Joined: Feb 2011
2015-11-04, 19:58:41
(This post was last modified: 2015-11-04, 20:02:25 by datiswous.)
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.
Posts: 6,267
Threads: 182
Joined: Sep 2011
Like i said though there are like three plugins to do this some in real time some permanently
Posts: 166
Threads: 24
Joined: Jul 2012
Thank you everyone for your advice!
Posts: 6,267
Threads: 182
Joined: Sep 2011
One might be just a script that is included in a thread.
Posts: 3,491
Threads: 106
Joined: Mar 2010
You mean this? http://get-simple.info/forums/showthread.php?tid=5082
Posts: 1,247
Threads: 82
Joined: Feb 2011
I guess these are some of the plugins:
http://get-simple.info/extend/plugin/ts-fastreplacer/799/
http://get-simple.info/extend/plugin/ts-tempreplacer/801/
http://get-simple.info/extend/plugin/ts-linkchanger/791/
http://get-simple.info/extend/plugin/migrate/966/
Ts-tempreplacer and Ts-linkchanger replace on the fly, so the actual files aren't changed (I assume).
There's also the plugins who change absolute urls to relative:
http://get-simple.info/extend/plugin/gsckerelativeurls/900/
http://get-simple.info/extend/plugin/absolute-link-fixer/743/
Posts: 3,491
Threads: 106
Joined: Mar 2010
Here's another one I made (but didn't upload to Extend):
Fix Site URL
Posts: 166
Threads: 24
Joined: Jul 2012
2015-11-07, 01:04:15
(This post was last modified: 2015-11-07, 01:04:36 by lnickel.)
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.
Posts: 3,491
Threads: 106
Joined: Mar 2010
Thanks to datiswous - he posted the list :-)
Posts: 166
Threads: 24
Joined: Jul 2012
(2015-11-07, 01:37:01)Carlos Wrote: Thanks to datiswous - he posted the list :-)
Yes thanks! Datiswous
Posts: 6,267
Threads: 182
Joined: Sep 2011
Someone make that a thread we can sticky
Posts: 3,491
Threads: 106
Joined: Mar 2010
or add this to the
Plugins Guide in the wiki.
Posts: 6,267
Threads: 182
Joined: Sep 2011
perhaps but this stuff changes over time.
Posts: 1,247
Threads: 82
Joined: Feb 2011
(2015-11-07, 03:33:57)Carlos Wrote: or add this to the Plugins Guide in the wiki.
I just did that.