403 error when installing WordPress and sharing a database

Category: Wordpress

MatijaP
Asked:
2013-08-30 9:45 am EST

Hits: 1,787
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.

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

BradM
Staff
5,399 Points
2013-08-30 10:06 am EST
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

You must login before you can post a comment about this answer.

Thank you on fast and detail reply,
It looks like my subdomain folder was 740 instead 745, and both install.php and wp-config.php were 644.
Subdomain folder owner was same, but group was different for some reason.

I changed that, and tryed different folders, and copying all files to the new folders but it still didn't work. Finally figured out that plugin WP better security of my main wordpress has done changes to .htaccess file so it redirects any attempt of accessing wp-login, wp-admin, install.php etc., not just in root but in all folders everywhere ever. Is there a way I could make .htaccess file in my subdomain folder that sets all rules to default or something ignoring parent folders? I really don't want to disable that plugin or any other on my main wordpress.
MatijaP
22 Points
2013-08-30 3:42 pm EST
Hello MatijaP,

Thanks for the question and sorry to hear about your plugin issues. You can place ANOTHER .htaccess file in each folder where you do not want the rule to apply. And that .htaccess file will be the one that applies for that folder. That would probably be a lot easier than trying to make a blanket rewrite statement that somehow decides when to not apply your plugin's rule. However, be aware that you're basically watering down your plugin's ability to protect your site due to these types of changes.

I hope this helps to provide you the answer that you seek. Let us know if you have any further questions or comments.

Regards,
Arnel C.
Arn
15,973 Points
Staff
2013-08-30 4:12 pm EST
Finally it works.
I somehow managed to disable the right .htaccess statements, manually installed other wordpress in same database, and installed same plugin to make rewrites in subfolder. Now it works.
Thx for bearing with me.
MatijaP
22 Points
2013-08-30 6:27 pm EST
Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!