Photo
- - - - -

FTP Remote Copy/Duplicate with FileZilla


  • Please log in to reply
16 replies to this topic

#1 IDM

IDM

    Tiny Orange

  • Members
  • Pip
  • 5 posts

Posted 29 March 2010 - 04:47 PM

Hey all,

I want to set up a template folder of a WordPress installation and remotely duplicate it via FTP. Is this possible?

I'm using FileZilla client.
  • 0

#2 davidatfuzzylime

davidatfuzzylime

    Designer; coder; geek

  • Members
  • PipPipPipPipPip
  • 443 posts

Posted 29 March 2010 - 04:53 PM

AFAIK FTP doesn't support duplicating of files/folders. My client pretends to, but if you duplicate something it just downloads it and uploads it again under a new name (though this may be fine for you, depending on your needs).
  • 0
fuzzylime: we know design
Save money when you sign up! Go here then use code giveme15 to get 15% off or giveme5 to get $5 off your order.

#3 IDM

IDM

    Tiny Orange

  • Members
  • Pip
  • 5 posts

Posted 29 March 2010 - 05:00 PM

AFAIK FTP doesn't support duplicating of files/folders. My client pretends to, but if you duplicate something it just downloads it and uploads it again under a new name (though this may be fine for you, depending on your needs).


Thanks for the reply. If anyone has any ideas on how to quickly duplicate a folder or set up new WP installations without using Fantastico that'd be cool. For now I'll probably just keep a few pre-uploaded WP install folders in there that can simply be renamed and edit one line of the config to finish the job.

What FTP client are you using btw Fuzzy?
  • 0

#4 davidatfuzzylime

davidatfuzzylime

    Designer; coder; geek

  • Members
  • PipPipPipPipPip
  • 443 posts

Posted 29 March 2010 - 05:02 PM

My personal approach (which I use for script installs) is to have a .zip containing a pre-set install, with templates etc, and use a PHP unzip script on the server - upload zip plus script, run script, and you've got a new copy, with total of two files needing uploaded.

I'm on a Mac, so use the fantastic Cyberduck. On PC I use WinSCP, which is the closest to "just looking like Explorer" I've been able to find!
  • 0
fuzzylime: we know design
Save money when you sign up! Go here then use code giveme15 to get 15% off or giveme5 to get $5 off your order.

#5 IDM

IDM

    Tiny Orange

  • Members
  • Pip
  • 5 posts

Posted 29 March 2010 - 05:25 PM

I'm a bit confused about the PHP unzip script. Is that a generic command or is it a custom script? Free or commercial?

I'd be happy to just push a button each time I need a new install of WP with the theme ready to go. Of course it can't create the database either, and I'm trying to make this as simple as possible for a non-techie guy.

WinSCP is great but I've only used it for messing with my iPod Touch. :) I'm still a PC guy, for now...
  • 0

#6 davidatfuzzylime

davidatfuzzylime

    Designer; coder; geek

  • Members
  • PipPipPipPipPip
  • 443 posts

Posted 29 March 2010 - 05:32 PM

I have a script I wrote based on the PCLZip library. I'll try to dig it out tomorrow and post it here...
  • 0
fuzzylime: we know design
Save money when you sign up! Go here then use code giveme15 to get 15% off or giveme5 to get $5 off your order.

#7 IDM

IDM

    Tiny Orange

  • Members
  • Pip
  • 5 posts

Posted 29 March 2010 - 05:37 PM

Really appreciate it, thanks David.
  • 0

#8 davidatfuzzylime

davidatfuzzylime

    Designer; coder; geek

  • Members
  • PipPipPipPipPip
  • 443 posts

Posted 30 March 2010 - 03:29 AM

Here goes! First off, grab PCLZip from here - my script uses v2.5 but I guess more recent ones will work fine too. Extract the .zip and get the pclzip.lib.php file.

Next, save this as install.php:

<?php
	require_once('pclzip.lib.php');
	$archive = new PclZip("myfile.zip");
	$list = $archive->extract();

	if($list == 0) echo("Unrecoverable error '".$archive->errorName(true)."'");
	else {
		echo "The script has been unzipped successfully.";
	}
}

?>

Change the reference to myfile.zip to whatever you've called your archive.

Finally, upload the archive, install.php and pclzip.lib.php to your server - make sure the directory you put them in has 0777 permissions, as otherwise things probably won't extract (you can change these afterwards). Then just browse to yoursite.com/newplace/install.php and everything should extract automatically!
  • 0
fuzzylime: we know design
Save money when you sign up! Go here then use code giveme15 to get 15% off or giveme5 to get $5 off your order.

#9 IBBoard

IBBoard

    Massive Orange

  • Volunteer Moderators
  • PipPipPipPipPipPipPip
  • 4,939 posts

Posted 30 March 2010 - 07:56 AM

Or, if you're not tied to FTP, ask ASO for an SSH account, log-in (using something like PuTTY if you're on Windows) and just run "cp -r /path/to/old/folder /path/to/copy/folder/to" :)
  • 0
The more information you provide, the better answer the community can give.

*** Sign up at ASO with a 15% discount (coupon: saveme15%) or $5 discount (coupon: saveme$5) ***
(Valid on shared hosting and VPS)

#10 davidatfuzzylime

davidatfuzzylime

    Designer; coder; geek

  • Members
  • PipPipPipPipPip
  • 443 posts

Posted 30 March 2010 - 08:13 AM

I really should figure out more of the SSH commands - that'd certainly be a very handy way to do things :)
  • 0
fuzzylime: we know design
Save money when you sign up! Go here then use code giveme15 to get 15% off or giveme5 to get $5 off your order.

#11 IDM

IDM

    Tiny Orange

  • Members
  • Pip
  • 5 posts

Posted 30 March 2010 - 04:06 PM

Thank you both. I'm going to probably end up using SSH because it sounds simpler, but I'll play with this script meanwhile. Big thanks!
  • 0

#12 Nepherim

Nepherim

    ever unphotographed

  • Members
  • PipPipPipPipPipPip
  • 870 posts

Posted 30 March 2010 - 10:13 PM

If you are not stuck on FileZilla, then WinSCP has the ability to duplicate a directory. WinSCP is free, and is rock solid stable.
  • 0
~ ~ Dave
tech | photography | journal | MR2

Sign up with ASO: sg5 for $5-off, best on orders under $33; sg15 for a 15% discount, best on orders over $33.

#13 IBBoard

IBBoard

    Massive Orange

  • Volunteer Moderators
  • PipPipPipPipPipPipPip
  • 4,939 posts

Posted 31 March 2010 - 07:05 AM

That'll probably only work with SFTP, which is not quite the same as FTP and is more like SSH. It is more secure (my VPS only has SFTP set up now - no FTP server at all) but it does mean that it'll have access to commands like "copy".

As for "learning ssh commands", they're Linux/Bash commands. SSH is just your tunnel in to the server :)
  • 0
The more information you provide, the better answer the community can give.

*** Sign up at ASO with a 15% discount (coupon: saveme15%) or $5 discount (coupon: saveme$5) ***
(Valid on shared hosting and VPS)

#14 davidatfuzzylime

davidatfuzzylime

    Designer; coder; geek

  • Members
  • PipPipPipPipPip
  • 443 posts

Posted 31 March 2010 - 07:14 AM

Aye, I don't use Linux aside from via SSH tho so I am pretty much completely clueless with them :)
  • 0
fuzzylime: we know design
Save money when you sign up! Go here then use code giveme15 to get 15% off or giveme5 to get $5 off your order.

#15 IBBoard

IBBoard

    Massive Orange

  • Volunteer Moderators
  • PipPipPipPipPipPipPip
  • 4,939 posts

Posted 02 April 2010 - 01:34 PM

The basics are quite simple, and shorter than Windows: cp copies, mv moves, rm removes, rm -r removes recursively, rm -rf is potentially dangerous as it removes recursively, cd changes directory, and everything has useful help/usage instructions in the form of "man cmd". Windows is decidedly lacking on that last one!
  • 0
The more information you provide, the better answer the community can give.

*** Sign up at ASO with a 15% discount (coupon: saveme15%) or $5 discount (coupon: saveme$5) ***
(Valid on shared hosting and VPS)

#16 davidatfuzzylime

davidatfuzzylime

    Designer; coder; geek

  • Members
  • PipPipPipPipPip
  • 443 posts

Posted 02 April 2010 - 01:35 PM

Cheers for the summary! I've used a lot of those now - starting to get the hang of it. Even started writing shell scripts this week ... I feel impressed with myself ...
  • 0
fuzzylime: we know design
Save money when you sign up! Go here then use code giveme15 to get 15% off or giveme5 to get $5 off your order.

#17 jednorozec

jednorozec

    Eclectical Engineer

  • Volunteer Moderators
  • PipPipPipPipPipPip
  • 1,176 posts

Posted 08 May 2010 - 09:13 AM

Besides 'man cmd' you can also use 'info cmd' and 'cmd --help'. I usually try the last one first and if that doesn't give me enough information then I use info.
  • 0
Join ASO and use a coupon to Save $5 or Save 15%




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users