Could not create directory. /public_html – Plugin Installation Error
This is a really annoying error that comes up every so often when installing new plugins. At first I thought it was because they weren’t compatible with my version of WordPress. However after spending some time searching for a solution to this issue, I found the solution and it’s super-simple.
Disclaimer: I am not responsible for anything that breaks on your website, is accidentally deleted, or that gets hacked. No support will be provided if you face issues using this free information.
FTP Solution
If you’re a beginner then this is the easiest and quickest solution to the Could not create directory. /public_html issue when installing a Word Press plugin.
- FTP into your website with one of the more popular programs
- Go into your WordPress directory and navigate to the folder /wp-content/
- Rename the upgrade directory to something like upgrade-old (you may optionally delete it but I prefer this method in case something goes awry)
- Create a new directory named upgrade in the same /wp-content/ folder
- Set permissions on it to 777 – basically give everyone permission to read, write and execute items in this directory. This is typically found under properties if you right-click the directory in some more popular FTP programs (e.g. Core FTP)
- Try to install the plug-in again and voila! It should work.
- Change permissions on the upgrade directory back to 755, a more secure setting to reduce the potential for someone to hack your website
Linux Solution
If you know your way around Linux, then the solution is just as simple with a few keystrokes:
- Log in through your server or a program like PuTTY
- Go into your WordPress directory and run the following sequence of commands:
- CD wp-content
- mv upgrade upgrade-old
- mkdir upgrade
- chmod 777 upgrade
- Try to install the plugin through WordPress again and it should work
- Reset permissions with the command: chmod 755 upgrade
Need more help? Get professional WordPress training in NJ and NYC