Couldn't create directory error in wordpress - wordpress

I installed a XAMPP application and used localhost to install the latest version of WordPress. Every time I try to upload the or update plugin or theme, it gives me an error
Couldn't create the directory.
I'm using Mac OS X, I've changed the permissions as well as I have added the define('FS_METHOD','direct'); command in the wp-config file. However, it is still not working for me.
What can I do in this case?
UPDATE
I have already tried following the steps in this article:
XAMPP permissions on Mac OS X?

Related

Permissions and performance issues using Windows 11 + WSL2 (Ubuntu), Docker Desktop & WordPress via docker-compose local environment

I am working on a project handed over by a previous developer which utilises docker desktop and a docker-compose.yml file to bring up a WordPress project on my Windows PC. This worked okay on my last PC (Windows 10), I've now upgraded to a new PC running on Windows 11.
The project worked fine with a non WSL version of docker, just using hyper-v and docker-compose with some mounted volumes to create the containers and code up a bespoke WordPress theme (running on roots/sage 8).
Since moving to Windows 11, the project has been almost unusable due to massively slow pagespeed (30 seconds minimum to load just about anything).
I tried to solve this by switching to WSL2. I followed tutorials from Microsoft & Docker to get WSL2 setup with Ubuntu.
I did a totally clean install of:
WSL2
Ubuntu
Docker Desktop
VS Code
My understanding is that adding the project files directly into Ubuntu is the best way to go as it should be a lot faster than trying to mount the files from Windows, so I setup SSH keys and cloned the repo into my /home/andy/ directory.
Running docker-compose up successfully fires up the website but I then get hit with loads of issues I never encountered while running the project via docker desktop without WSL2.
WordPress or the web user seems to be lacking permissions to write to the wp-content directory
-- Can't install any plugins
-- Can't upload media
VS code (launched via code . in the project directory) doesn't have permission to write to anywhere in wp-content
FileZilla is unable to create any folders within wp-content including in wp-content/uploads
I need to get this project working, I'm obviously not a docker or linux expert, I just need to get it fired up so I can continue coding with WordPress!
I've trawled through most pages of Google's search results for people having similar issues and I've done a fresh install of the WSL2/Docker setup multiple times after trying different things to get this to work but nothing is working.
I've tried:
adding to the docker-entrypoint.sh chown -R www-data:www-data /var/www/html
-- This was to try and give the www-data user ownership of everything mounted into the var/www/html directory, which appeared initially to help but broke other permissions, like Filezilla being able to write to wp-content
Ensured that all the directories/files in my project folder had the correct permissions for WordPress 755 for directories & 644 for files
-- Had no effect on the issue
Attempted to set 777 recursively on the entire project directory in Ubuntu
-- Still had issues with FileZilla & VS Code, and for some reason, when I did docker-compose up the permissions on wp-content reset themselves from 777 to 755
Added user:$USER within the wordpress part of the docker-compose.yml file, and then did USER=root docker-compose up
-- This appeared to give WordPress the permissions/access needed in order to write to wp-content as I could now download and install plugins, and upload media, but the entire backend of WordPress was very slow and I still couldn't save files with VS code, or download with FileZilla.
Attempted to take ownership of the /home/andy directory where my project files live via sudo chown -R andy /home/andy/
-- This allowed VS Code & FileZilla to both work as expected, saving files and downloading files from a remote server into Ubuntu via WSL2
With weird root user hacky solution + chown on the user directory, I appeared to have got everything "working", but wp-admin was so ridiculously slow, it was barely usable.
Another post I came across said that using .local to access the site was a bad idea since that could cause slow performance with docker, so I then changed the website url in my hosts file, and did a find and replace on the DB/Files to reflect the change, and now the backend of WordPress works fast, but appears to have permissions issues as lots of plugins are complaining about not having the correct permissions and I'm unable to download / install or even deactivate existing plugins.
I'm basically at a total loss at this point as for how to get this working. If anyone has any suggestions I'd be very grateful.
Thanks!

How to remove old localhost that goes to wordpress?

I installed wordpress locally on my system but uninstalled it recently. Now I have xampp and my apache, mysql all running but when I type localhost in URL it's still the same old localhost:
"Awesome! WordPress is now installed.
Access WordPress"
How do I change it so Xampp is my localhost?
Try to restart your system and clear your browser cache and also remove your WP database if you want a fresh WP installation
1) go to the xampp directory and you'll find a folder named htdocs there. remove all files from that folder.
2) force restart the browser by pressing ctrl + f5

installation of wordpress with xampp

I want to install Wordpress on my pc so first, I need to install xampp.
After installation when I'm trying to start apache it is automatically shutting down. So I changed the localhost port number to 8080 then it started.
But now the problem is when I'm trying to run Wordpress it is not opening correctly.
Here is a screenshot of my error. Please help with installation of Wordpress with the xampp
I think you have to check first if any other html file is working fine or not on the root directory inside (www) folder. If its working fine then try with http://localhost/wpfive
see my example screenshot for this.
Best of luck

Object not Found after installing Wordpress w/ XAMPP

I just finished installing Wordpress (through Bitnami) and am running an Apache server with XAMPP. After installation, it tried to load the initial blog page and had the error. I can access localhost, but not the http://localhost/wordpress. No other questions about this topic seem to have this same problem.
Try this:
Create a new folder (site)
From the link below, download and extract the WordPress loader (installer) php script into the new folder:
http://www.alistercameron.com/2010/04/09/wordpress-loader-faster-easier/
Run http://localhost/<new_folder>/wordpress_loader.php and follow the on-screen instructions to complete the installation

Can't install Acquia Drupal Commons locally

Working on a MacbookPro OS 10.6.6 , using MAMP Pro 1.9.4.
I'm attempting to install Acquia's Drupal Commons locally. The installation progress bar goes all the way, I can check in phpMyadmin that the database has been populated, but before the site configuration screen , I get a 500 Server Error!
Standard Drupal 6 or 7 install without any problem & I was able to install Drupal Commons on my web server. So it seems that some form of conflicts happens between my server configuration ( Mamp Pro ) and Drupal Commons.
Thanks in advance for any suggestions!
Did you check that your sites/default/default.settings.php file was copied to settings.php and not just renamed?
I remember having problems setting up Drupal when I just renamed it, both files need to be there.
I solved the issue by raising the PHP limit in Mamp to 96M.
File > Edit Template > PHP > PHP Version
//Search for 'memory_limit' & edit the value
memory_limit = '96M';
then restart the server.
After dong this Drupal Commons should install without any problems.

Resources