LAMPP/XAMPP + WordPress: Asking for Connection Information to install plugins

A standard LAMPP install on Ubuntu hosting a wordpress site is going to yield a screen asking for connection information if you try to install a plugin using the integrated installer.  To get around this, fix the ownership of the wordpress directory and the permissions.

NOTE: what I’m about to tell you to do is NOT SECURE.  It’s OK for local development in a closed environment where no one is trying to hack you.  By following this, you’ll be allowed to install the plugins as expected, but you’ll be opening a major security hole in your system.  I disclaim all responsibility for consequences of you following my advice.

That said, here’s what to do:

  1. Open a Terminal (Applications > Accessories > Terminal)
  2. enter sudo chown -R nobody\: ~/workspace/website-folder and press RETURN
  3. enter sudo chmod -R 777 ~/workspace/website-folder and press RETURN

Note: replace ~/workspace/website-folder with the path to your website folder.

When you FTP the files, the permissions will not be kept, so it should be OK to develop like this and then upload it to a remote server, then tweak only the necessary permissions.

11 thoughts on “LAMPP/XAMPP + WordPress: Asking for Connection Information to install plugins”

  1. It doesn’t work even when I selected a new theme(.zip file) from Appearance >> Add new themes >> Upload option. It is continuing asking me to provide connection information in my Ubuntu LAMP system. What should I do to remove this ?

    Thanks in advance!

  2. Output:
    ls -l /var/www/wordpress/
    total 288
    -rwxrwxrwx 1 nobody nogroup 397 2008-05-26 02:03 index.php
    -rwxrwxrwx 1 nobody nogroup 15410 2008-12-06 13:17 license.txt
    -rwxrwxrwx 1 nobody nogroup 7644 2010-02-14 01:05 readme.html
    drwxrwxrwx 8 nobody nogroup 4096 2010-02-15 22:22 wp-admin
    -rwxrwxrwx 1 nobody nogroup 40400 2009-10-25 16:02 wp-app.php
    -rwxrwxrwx 1 nobody nogroup 220 2008-10-14 11:52 wp-atom.php
    -rwxrwxrwx 1 nobody nogroup 274 2008-05-25 21:20 wp-blog-header.php
    -rwxrwxrwx 1 nobody nogroup 3928 2010-01-08 01:08 wp-comments-post.php
    -rwxrwxrwx 1 nobody nogroup 238 2008-10-14 11:52 wp-commentsrss2.php
    -rwxrwxrwx 1 nobody nogroup 2972 2010-05-18 18:46 wp-config.php
    drwxrwxrwx 5 nobody nogroup 4096 2010-05-20 19:09 wp-content
    -rwxrwxrwx 1 nobody nogroup 1253 2009-08-16 10:29 wp-cron.php
    -rwxrwxrwx 1 nobody nogroup 220 2008-10-14 11:52 wp-feed.php
    drwxrwxrwx 6 nobody nogroup 4096 2010-02-15 22:22 wp-includes
    -rwxrwxrwx 1 nobody nogroup 1946 2009-05-06 01:13 wp-links-opml.php
    -rwxrwxrwx 1 nobody nogroup 2341 2009-05-20 22:02 wp-load.php
    -rwxrwxrwx 1 nobody nogroup 22721 2009-12-15 03:39 wp-login.php
    -rwxrwxrwx 1 nobody nogroup 7578 2009-09-19 02:13 wp-mail.php
    -rwxrwxrwx 1 nobody nogroup 487 2009-04-21 03:20 wp-pass.php
    -rwxrwxrwx 1 nobody nogroup 218 2008-10-14 11:52 wp-rdf.php
    -rwxrwxrwx 1 nobody nogroup 316 2008-05-25 21:20 wp-register.php
    -rwxrwxrwx 1 nobody nogroup 220 2008-10-14 11:52 wp-rss2.php
    -rwxrwxrwx 1 nobody nogroup 218 2008-10-14 11:52 wp-rss.php
    -rwxrwxrwx 1 nobody nogroup 23097 2009-12-14 06:08 wp-settings.php
    -rwxrwxrwx 1 nobody nogroup 3693 2009-11-26 16:59 wp-trackback.php
    -rwxrwxrwx 1 nobody nogroup 93445 2009-12-01 13:44 xmlrpc.php

    1. That looks OK. Create a php file called whoami.php in that directory, and then paste this code into it
      < ?php echo exec('whoami') or die("It doesn't work"); ?>
      Then navigate to it via http and let me know what it spits out.

  3. That’s really strange. You’ll need to do some research on your system setup to figure out why that would happen. I’m on Ubuntu, and with a stock install of LAMPP, If I do that same thing and go to whoami.php, it prints “nobody” without the quotes. That’s the user who needs to own the whole wordpress directory in order for you to be able to use the plugin installer and upgrade tools when testing locally. That’s why we do the chown -R … it CHanges OWNership Recursively. Then we chmod (CHange/MODify?) the permissions to read/write/execute for all system users so you can still edit the files.

    Yeah, I would start Googling about whoami returning 1, maybe see if you can figure out some other way to figure out who the default, anonymous web user is on your system, then chown the files to that user instead of “nobody.”

  4. I’ve tried to run whoami command from the following path from my system terminal window. (/var/www/wordpress/) However, it prints my system user name: “piyush” as a output. Do I need to set that name as a owner of word-press directory?

  5. No. When you run it at the command line, it tells you who you are. When you run it from PHP using the exec function, it tells you who the anonymous web user is. When you go to a web site, unless you log in, then you’re an anonymous web user as far as the server is concerned. So it’s not good enough to know what whoami returns when you enter it at the command prompt.

  6. Can you please help me in that what should I check into my system? or is there any other way to know about what anonymous web user is running behind the directory /www/wordpress/ ?

  7. I don’t know what else to check. Have you googled things like “lampp anonymous user” and checked the XAMPP/LAMPP forums? By the way, when you find a solution, can you post it back here so I can add it to my article?

  8. Okay sure, I will do googling for a next couple of days and when I will get a solution of this, I will definitely post here. Thank you. 🙂

Leave a Comment

Your email address will not be published. Required fields are marked *