Weird FTP server problems
If your WordPress site is installed on a server that has a weird/non-conforming FTP server, then it will be helpful to know that WordShell by default does all of its FTP via lftp, using the configuration file ~/.wordshell/lftp/rc by default. If you do not have lftp, or if you specify –nolftp, then it uses curl, which you can configure using a config file – see the –config option in the manual page. You can read the lftp manual (man lftp), and try to get lftp working with your site, or similarly with curl. When you find the solution, you can add the necessary configuration to the relevant file. Anything that you can get to work in lftp/curl, you will be able to get to work in WordShell, so concentrate on a successful connection with just lftp/curl. Note that lftp/curl both sometimes have separate options for its connection settings when listing files as opposed to uploading/downloading them, so in your tests make sure that both of those operations work. We recommend lftp over curl, as it is more fully-featured. For example, it can sync sites in parallel (faster), instead of one file at a time.
General hint: try SFTP
If you find FTP problematic, then SFTP is a much simpler protocol. (Despite the similar names, they are different protocols completely). See if your web host supports that and you may save yourself some time.
To get deeper information on what lftp or curl are doing, add –debug switches to your WordShell command-line; you can add it one, two or three times to give more and more information.
FTP servers with broken encryption
Sometimes, the remote FTP server advertises that encryption is available, but in fact it is broken. This often causes sites that apparently worked when you set them up to just hang and do nothing when you try to transfer files. In this case, you can use the switch –disableftptls. If you find that this solves you problem, then edit your WordShell configuration (command: wordshell –editconfig) and find the entry for the site; then change the access method from “ftp” to “ftpp”. This will force WordShell to disable FTP encryption on the site always.
Maximum number of parallel connections
By default, WordShell allows lftp to try up to 9 parallel FTP connections at once, for speed. It is possible that the FTP server might refuse to allow this many (even though it is quite a conservative setting – more may be possible). There are 4 ways in which you can instruct WordShell/lftp to use a different limit:
- Open up the wordshell script in a text editor, and find the line that begins “FTPPARALLEL=9”, and edit it to a new default. This is over-ridden by any default set by the next three methods.
- Edit WordShell’s default for all sites, e.g. by running “wordshell –setconfig=ftpparallel:3” (change the 3 to your chosen value).
- Specify your chosen value on the command-line when running, by adding –ftpparallel=6 (or whatever your chosen value is).
- Change it on a per-site basis (which will then always be used for that particular site) by editing the WordShell configuration file (command: wordshell –editconfig) and adding a site option . e.g. If the site’s nickname is “mysite”, then add a line as follows: siteopt#mysite#–ftpparallel=6
- Next section: WordShell internals
- Previous section: Content directories in non-default locations
- This chapter index: Debugging / tips and tricks / internals