You shouldn’t need to change any permissions to install and setup WordPress. Have you…
- checked wp-config.php is setup correctly?
- set WP_DEBUG to true in wp-config.php?
It would be easier to help you solve the problem if you provide more details about your hosting setup and where exactly in the setup process you are getting the access denied error.
Thread Starter
wperic
(@wperic)
My hosting setup is my laptop running Fedora 40.
I download the file, unzip it, move the wordpress directory to my html directory. Then I go to Firefox and enter localhost/wordpress. This has always just worked in the past, but it’s not working with the 6.8 download. Instead, I get a page that says “access denied.”
That happens before I have touched wp-config.php. wp-config-sample gets modified with the DB info and saved as wp-config.php during the setup process. WP 6.8 doesn’t let me get to that stage.
BTW, I ran an older WP site (wordpress-experiments) and updated it with the files from the 6.8 download, and that is working fine.
Fix Ownership
Instead of only permissions, make sure the files are owned by the web server (usually apache or www-data):
sudo chown -R apache:apache /var/www/html/your_wp_folder
This is how you can solve this problem, Hope you find the solution of your problem.
Provide us more details on your issue enabling WP debuging and posting any error/warning messages you’ve got in here this thread.
Run these two commands:
sudo chown -R apache:apache /var/www/html/your-wordpress-folder
sudo restorecon -Rv /var/www/html
Then reload your site.
Why?
Because on Fedora, SELinux blocks access even if permissions are 777.
You need correct ownership and SELinux context, not just permissions.
Thread Starter
wperic
(@wperic)
That’s interesting, Sakib. I thought SELinux was an option. I don’t remember turning it on. And I’ve never had trouble in the past with the html directory and WP files being owned by eric:eric. As I noted above, the 6.8 WP is working fine when I used files from the 6.8 download to update the older WP installation owned by eric:eric.
Jorge and Dillon: WP_Debug won’t help if apache can’t even access the WP files to run setup, will it? In fact, there isn’t a wp-config file until after setup is run. Even if I manually created the wp-config file, is there anything to “debug” until the “access denied” problem is solved?
I appreciate all the replies. Thanks.
Thread Starter
wperic
(@wperic)
I started over from scratch with a new download of 6.8 and a new database–the advantages of working on localhost. Everything went fine without making apache the owner.