Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-09-15 22:52:55
- mbrenwall
- New Member
- Registered: 2006-08-30
- Posts: 6
how do i move a live to to local
I am just starting a 6 month trip throughout southeast asia and have started building a site on a live server hosted on dreamhost. Everything there is going well but since i won’t always have internet access, I’m trying to load the site on my laptop so i can work on it on the trains and such.
I installed everything I need and moved the database. When i go to “localhost” i get the homepage just fine but when i click on any of the articles i get a 404.
Any ideas on what’s happening?
IIS/php5/mysql4
Offline
Re: how do i move a live to to local
Do they work if you switch the permlink mode to messy? That should do it, I think. You can also try a WAMP combo instead of IIS too. Uniform Server and XAMPP are two of many easy-to-install packages that work with clean URLs.
Offline
#3 2006-09-15 23:20:12
- mbrenwall
- New Member
- Registered: 2006-08-30
- Posts: 6
Re: how do i move a live to to local
Thanks. That works for the individual articles!
But… I have a few hard-coded links to different sections for instance “www.hostname.com/portfolio” to display all the articles in that section and those links still do not work. Am I doing something wrong? maybe those links aren’t supposed to be hard-coded…
Offline
Re: how do i move a live to to local
When using messy URL’s, sections use the following format: www.hostname.com/?s=portfolio
Also of interest: <a href=“http://textpattern.net/wiki/index.php?title=Moving_Installation_from_Remote_%28Live%29_Server_to_Localhost” title=“Moving Installation from Remote (Live) Server to Localhost”>Moving Installation from Remote (Live) Server to Localhost</a> at TextBook.
Offline
#5 2006-09-15 23:45:07
- mbrenwall
- New Member
- Registered: 2006-08-30
- Posts: 6
Re: how do i move a live to to local
Thanks Elenita!
That begs the question about whether I’m coding those links properly. Is there a textpattern tag that i’m supposed to be using rather than hard-coding?
Also, your link leads to a textbook page but the article is linked from there and that link is dead.
Thanks again!
Offline
Re: how do i move a live to to local
For dev sites (or sites going into subfolders), it’s easiest to craft your links like this:
<code>
<a href=”<txp:site_url /><txp:section />”>A Link to a Section</a>
<a href=”<txp:permlink />”>Permlink (same as wrapping w/permlinks)</a>
Category list:
<txp:category_list break=“li” wraptag=“ul” />
Section list:
<txp:section_list break=“li” wraptag=“ul” />
</code>
Basically, use site_url in place of a slash or site url. site_url outputs the url with a trailing slash. txp:section and category know whether you’re using messy or clean urls, so they’ll be correct. For linking to articles with Textile, check out zem_link
Offline
#7 2006-09-16 09:23:25
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: how do i move a live to to local
Instead of <a href="<txp:site_url /><txp:section />">A Link to a Section</a> you can do this: <txp:section title="1" link="1" /> (txp:section, txp:category). It will automatically use the permanent link mode that is set in preferences, and change the links if you move the site to another directory or to the root, or from live to local and vice versa.
Offline
Re: how do i move a live to to local
<a href=“http://wion.com/journal/moving-a-live-textpattern-site-to-a-local-server”>More detailed instructions on moving from live to localhost</a>.
Offline
#9 2006-09-16 18:00:16
- mbrenwall
- New Member
- Registered: 2006-08-30
- Posts: 6
Re: how do i move a live to to local
Thanks Elenita,
but your link produced this error:
“Network Error (tcp_error)
A communication error occurred: “Operation timed out”
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.
For assistance, contact your network support team.”
I think there is something wrong with that site for now…
Offline
#10 2006-09-17 03:04:57
- mbrenwall
- New Member
- Registered: 2006-08-30
- Posts: 6
Re: how do i move a live to to local
After a little searching and lots of help from the TextPad community, this is the solution I’ve come up with that seems to be working…
Link to sections using: <txp:section link="1" title="1" name="archive" />
where I change “name” to be the name of the section
thanks all!
<small>(edited to display code properly. -Els)</small>
Last edited by els (2006-09-17 09:54:07)
Offline
Pages: 1