Cloned Bedrock site giving me 403 Forbidden

  • | 3525 points

    Hi, I've tried to clone a Bedrock / WordPress site from BitBucket that a client wants me to work on. I think I have all the environmental variables set up correctly so can anybody give me a hint to why the URL is returning a 403?

    I've run composer install.

    The directory structure looks fine:
    "C:/laragon/www/my-project/web/app" etc. my-project.test in hosts

    my has the following:
    define ROOT "C:/laragon/www/my-project/web"*
    define SITE "my-project.test"

    • This seems to be fine as if I change the root value to anything else the error message is different.

    My .env file at "C:/laragon/www/my-project/" has the following:

    When I type in http://my-project.test to the address bar it resolves to:

    That's where I get the 403, "You don't have permission to access /wp/wp-admin/install.php on this server".

    If you have a Bedrock site running on Laragon could you compare your settings with mine? Thanks in advance.


  • | 3525 points

    To add to this my Apache logs are giving me the following error:

    [Tue May 18 11:57:26.530305 2021] [access_compat:error] [pid 2896:tid 1132] [client] AH01797: client denied by server configuration: C:/laragon/www/my-project/web/wp/wp-admin/install.php, referer: http://my-project.test/wp/wp-admin/install.php

  • | 3525 points

    This appears to be fixed now by replacing the .htaccess file in /my-project/web/ with a basic version.

    # BEGIN WordPress
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress

Log in to reply

Looks like your connection to Laragon was lost, please wait while we try to reconnect.