0
Answered

403 error when installing WordPress and sharing a database

MatijaP 7 years ago in Blogs and Content Management Systems / WordPress 0
Hello,
I tryed to install second wordpress manually (not from cpanel) inside subdomain's folder with wp-config set to use same database with different prefixes and same user tables. The Followind error occured at installation (actually at anything):

Error 403 - Forbidden

You don't have permission to access the requested resource. Please contact the web site owner for further assistance.

If I delete wp-config.php then I can run installation to the point where wp-config file is created. Error shows again. If I install wordpress through cpanel it works, but that is not what I want since database is not shared.
There are no .htaccess files in subdomain folder nor file permissions are any different than on working main wordpress.
Hi MatijaP, I could be wrong, but I don't think the error you're receiving is because of installing WordPress and sharing the database of another WordPress installation.

403 errors - check your permissions

403 errors are usually caused by incorrect file permissions. You'll want to make sure that your folders have permissions of 755 and your files have permissions of 644. If you're installing WordPress manually, it could be that when you unzipped a file or uploaded the files that one of them was set not using 755 / 644. If it is a file permissions issue, or even it if it isn't, the error log section of your cPanel may give you more details of what is causing the problem. For example, 403 forbidden error is very vague, the error log may tell you which file has incorrect permissions. The following tutorial has more information about the error log in cPanel: How to view cPanel Error logs If the problem is file permissions, you can follow the steps in the below article to learn how to modify your file permissions: How to change file permissions within cPanel

What has caused 403 errors for others when installing WordPress?

On this page, 403 during install on step 5 (Run the install script), the user stated their solution included: This worked: Initially, I had moved the directory where the tarball was untar-ed to the html directory and changed the permissions. That did not work. Later on, I created a directory and copied all the files to that directory. That worked fine. Here, 403 Forbidden for install.php, the user's solution was: I had this problem on my own server. It turns out I was installing the blog into a directory which was not permissibe enough. For example, installing at http://myserver/blogs/blogname/ didn't work until I set both the 'blogs' and 'blogname' directory to 775. (In addition to making sure install.php was 777 and wp-config.php was 775). Let us know if the information about helps or not. Thanks! - Brad