William Jiang

JavaScript,PHP,Node,Perl,LAMP Web Developer – http://williamjxj.com; https://github.com/williamjxj?tab=repositories

WordPress failed to connect to ftp server & Solution

WordPress failed to connect to ftp server & Solution

I have my own blog in wordpress.com: williamjxj.wordpress.com, and I want to make a copy to my own site: http://williamjxj.com/, so both the sites will show my blogs.

in williamjxj.com server, following the installation guide, I installed the latest wordpress, then start to import XML format blog which is exported from williamjxj.wordpress.com.
While I did the import, it failed and always displayed:

failed to connect to ftp server

I searched on web, and modified dirs/files permission, not work; so I am sure this is not the permission issue, it is about the FTP daemon which is not installed on the server.
I searched on my CentOS server, and could not find a FTP daemon running, so decided to install VSFTP package.
Fortunately, there is a very good article to explain how to set up vsftpd on CentOS 6:

How to Set Up vsftpd on CentOS 6

The following are my steps:

//1. install vsftpd daemon.
$ cd $HOME/downloads/
$ sudo yum install vsftpd

//2. make sure ftp click also installed
$ yum list installed | grep ftp
// If not, install it: sudo yum install ftp

//3. do a slight configuration:
sudo vi /etc/vsftpd/vsftpd.conf
anonymous_enable=NO
local_enable=YES
chroot_local_user=YES

//4. start the daemon.
$ sudo service vsftpd start
or:
$ sudo /etc/init.d/vsftpd start

//5. do the test, from command-line or browser:
$ ftp ftp://williamjxj.com
// It should work

After the installation and running the VSFTPD dameon, now go back to wordpress->Tools->Import page, try again,
It works! Successfully install my XML blog into http://williamjxj.com.

Advertisements

One response to “WordPress failed to connect to ftp server & Solution

  1. christian loubiton 02/03/2013 at 6:56 pm

    Pretty component of content. I just stumbled upon your blog and in accession
    capital to say that I acquire in fact enjoyed account your blog posts.
    Anyway I will be subscribing for your feeds and even I
    fulfillment you get right of entry to consistently rapidly.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: