So you’ve installed WordPress and it’s just not working out. Maybe you’re getting one of these error messages:
“You need to make this file writable before you can save your changes. See the Codex for more information.”
“The uploaded file could not be moved to…”
“Sorry, I can’t write to the directory. You’ll have to either change the permissions on your WordPress directory or create your wp-config.php manually.”
What to do? Why not toss the entire kitchen sink at it? After all, that’s what 90% of solutions I found online suggested.
Just chmod 777 the directory and it will work!
Why not just set your password to the name of your blog?
I’m not a person who uses Linux every day of the week, but I do appreciate it and see it’s use in meeting some business goals. So, I got a bit frustrated. I’d fix one problem, discover another, fix that, discover another. So, I stopped and thought about the situation – I even phoned a friend (thanks Ron!).
There were two facts I had to deal with before moving forward:
1. Not everyone has these problem.
2. The solution is related to permissions, but the way I was fixing them wasn’t the right way.
Then it hit me. After I uncompressed the download and moved it into the www directory, I did not change the owner of the folder and all child folders/files.
A bit of background, I’m running WordPress on a Ubuntu LAMP Server. So, I realize the configuration may differ, but if you’re having the same problems, regardless of distro, the solution is the same.
First, figure out what user and group the folder needs. For my server, it was www-data for both. So, I used the following command:
chown -R www-data:www-data wordpress
or
chown -R www-data:www-data www
(depending on where you moved the wordpress directory)
Also, you’ll need to set permissions:
chmod -R -v 755 wordpress
or
chmod -R -v 755 www
(again, depending on where you moved the directory)
After completing this step, then go to http://webserver/wordpress (or whatever URL you’re using) and you won’t have the errors listed above.
Andrew Troubleshooting Linux, Open Source, Server Admin, Software, Solution, Ubuntu, WordPress