This question has been archived.

403 Forbidden when changing Wordpress Site Address

May 18, 2015 7k views
WordPress Configuration Management Security

Hello, I'm having a bit of trouble setting up my website.

I created a droplet with a wordpress install, finished the wordpress set up and got rid of the initial authentication when trying to browse to the IP. The address is:

However, if I to change the wordpress site address to: '' for instance, if I try to navigate to that address I get a '403 Forbidden' error: 'You don't have permission to access /sogoodblog/ on this server.'

Similarly, if I attempt to change both the Wordpress Address and the Site Address to: '', move the wordpress related files into a subfolder of 'www' called 'sogoodblog', and navigate to that address, I get the same error.

Effectively, I want the wordpress blog to be secondary to a front page that I have created for the site. I have done this before with another site using DigitalOcean with help from this question: but am having trouble this time around,

Any help would be greatly appreciated!


  • @sierracircle Sorry to ask, but d'you think you could give me a hand with this?

  • If it is just the home-page you want, it is possible to edit (or create if there is not one) a file in your wordpress theme folder called front-page.php

    you can add whatever you want to that file..just plain html, or php, or whatever. It will always show up as your home-page to your wordpress site

  • @sierracircle Well actually I've also been unable to install dopresskit, something that requires a 'press' subfolder, have you got any idea why trying to browse to a sub folder would cause an authorisation error? Thanks for the reply!

  • I just helped someone earlier today where there was a similar issue: one-click install of Wordpress causing permissions issues when trying to do things with the website folder.

    I ended up with a solution that seems to have worked. It involves installing fuse .

    Do you have a user other than root that you use to login and ssh with?

  • try this

    commands to run:

    sudo apt-get update&&sudo apt-get -y install bindfs
    sudo rm ~/www
    mkdir ~/www
    chown -R $USER:$USER ~/www


    sudo nano /etc/fstab

    paste this line into the bottom of your file. Change USER to your username:

    bindfs#/var/www /home/USER/www fuse force-user=USER,force-group=USER,create-for-user=www-data,create-for-group=www-data,create-with-perms=0774,chgrp-ignore,chown-ignore,chmod-ignore 0 0  

    ctrl X and then enter to save the file

    Then do:

    sudo mount ~/www

    Now see if you can go to your home folder, then the www folder ...can you browse that, create files, etc?

  • @sierracircle When I try to run ' sudo rm ~/www' I get the error:
    'rm: cannot remove '/home/tempuser/www' : No such file or directory'

  • no problem, you can skip that part...

    are you running these commands from your user? (not root)

  • @sierracircle Okay, I thought I probably could but wanted to be sure, and yes I am, 'tempuser' is my imaginatively named user that isn't root!

  • @sierracircle Have done all of that, and I'm now able to create files in the www folder as 'tempuser', whereas before I wasn't able to!

  • great. As an added bonus, your folder in /home/tempuser/www will solve a lot of permissions can create new files as your user, and www-data can still have full access.

    just keep in mind that /var/www and /home/tempuser/www are the same folder,

  • @sierracircle Brilliant, thank you for coming to my aid once again, I will have a go at installing presskit/putting the blog in a subfolder and hopefully I wont have to come and hassle you again! (for this problem at least)

  • glad you got it working!

  • @sierracircle Alright, spoke too soon, of course!

    Now if I try to browse to '' without having changed any of the wordpress settings, and with nothing but the default wordpress install in the 'www' folder, I get the 403 error 'You don't have permission to access / on this server.'

    If I put a basic 'index.html' file in the 'www' folder that loads fine.

    Similarly, if I create a folder called 'sogoodblog' and try to browse to it, I get the same 403 error, but if I put an 'index.html' file in the 'sogoodblog' folder, that loads fine.

  • maybe run:

    sudo chown -R www-data:www-data /var/www
  • @sierracircle No luck unfortunately!

  • I might be able to help you more tomorrow morning. at the moment I have to get some work done

  • @sierracircle Not a problem, thank you for you help, sorry for taking up so much of your time!

  • maybe a digitalocean person can chime in about how the permissions for one-click wordpress installs are set up?


  • @jackgill did you ever get this sorted?

  • @sierracircle I'm afraid I didn't really fix it, I got what I wanted by making an image of my previous site that you helped me with,, and creating a new droplet using that image.

    Sadly, I have no real idea what the difference is between the two! But thank you for all your help regardless!

  • Glad you were able to figure out a work-around. I think next time this issue pops up I am going to just create a droplet with Wordpress pre-installed so I can figure out exactly what is going on.

Be the first one to answer this question.