If you’ve ever had problems with WordPress automatic updates on a local install of XAMPP this should fix it (note that I’ve tested it on OSX but it should work for Windows/Linux but the details will be different). For a long time I just did the updates/installs by manually installing because the automatic upgrades never worked or it would ask for my ftp details. And no matter what ftp details I entered it would never connect. Same for plugin installs or updates.
Turns out that it has nothing to do with ftp settings, it was a simple file permissions conflict. XAMPP was running its local Apache as user ‘nobody’ while the files on my hard disk were owned by my local user ‘ian’. When WordPress came across this conflict it fell back to ftp mode but since it is a local install, that didn’t work.
So what to do? The easiest thing to do is to edit the XAMPP apache config file to run it as your local user. To find out your local user name, just launch terminal and in your home directory run:
ls -al
then edit the config file. If you are comfortable with using vi type this:
sudo vi /Applications/XAMPP/etc/httpd.conf
If not you can use the TextEdit app, you need to type this into the terminal:
sudo open -e “/Applications/XAMPP/etc/httpd.conf”
look for these lines:
User nobody Group admin
and change them to:
User yourusername Group staff
You’ll have to restart XAMPP’s Apache and if you attempted automatic updates before and failed, you’ll have to delete the upgrades folder inside wp-content.
Hope this helps other WordPress designers and developers using XAMPP. Please leave a comment or have a look at messa.tv if it did :)
Related posts:
- How to create a single wp-config file for local and remote WordPress development If you are developing WordPress sites, themes or plugins, you...
- Thoughts on the GPL and WordPress themes Why the GPL doesn’t matter WordCamp Kyoto 2009 was...
Related posts brought to you by Yet Another Related Posts Plugin.



英語
日本語
Entries
Comments
Thanks so much – this totally solved my problem!! A lot of people are asking about this on the Wordpress forums – I’ll send them your way…
Great to hear that it helped you and thanks for telling others.
If you’re working a lot with virtual hosts on XAMPP or MAMP you might find this post: How to create a single wp-config file for local and remote WordPress development helpful too.
Hello Guys,
I did try to do this. However it only opens up the config file in my terminal. I cannot type or change anything. Is there something I am missing out on ?
Regards,
-Unmesh
Ok so I did manage to play around and get the terminal editable. How would I save it from the terminal.
(Sorry if this a rookie question. I am new to the Mac/Linux)
Hi Unmesh,
Sorry, yes vi has quite a steep learning curve. I forgot because I’ve used it everyday for months.
There are lots of tutorials out there but for what you need, press i to start edit mode, use the arrow keys to move around and then when you are finished the edits, press esc and type :x followed by return.
I hope this helps you and others. Thanks for this out, I will update the tutorial soon.
Ian
Or you can use the TextEdit app by typing:
sudo open -e “/Applications/XAMPP/etc/httpd.conf”
Ian
Hi, I tried this and found it deactivated the mysql database and no means to reactivate it……. Although editing httpd.conf is helpful for this purpose, no access to my database is still a large problems. Maybe it is a bug of XAMPP. Anyway, thank you for your tips.
[...] You can find more detailed instructions at the source: edit the XAMPP apache config file to run it as your local user. How to fix WordPress automatic upgrades and plugin installs on XAMPP [...]
eumenr,
Sorry to hear about your problems. Don’t know why it would deactivate mysql since they are two different programs (apache and mysql). Sometimes I find XAMPP a little buggy, like when I stop Apache and restart it via the GUI, it tells me that I still have apache instances running, so cannot start it.
I can only suggest you shutdown both apache and mysql and try restarting them. You may have to use the terminal or Activity Monitor to do so.