InMotion Hosting Support Center

403 error when installing WordPress and sharing a database

Category: Wordpress

2013-08-30 9:45 am EST

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



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.

<h2>403 errors - check your permissions</h2>
<a href='/support/website/error-numbers/403-forbidden-error' target='_blank'>403 errors</a> 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 <em>error log</em> section of your cPanel may give you more details of what is causing the problem. For example, <em>403 forbidden error</em> 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:
<a href='/support/website/cpanel/how-to-view-cpanel-error-logs' target='_blank'>How to view cPanel Error logs</a>

If the problem is file permissions, you can follow the steps in the below article to learn how to modify your file permissions:
<a href='/support/website/how-to/change-file-permissions' target='_blank'>How to change file permissions within cPanel</a>

<h2>What has caused 403 errors for others when installing WordPress?</h2>

On this page, <a href='' target='_blank'>403 during install on step 5 (Run the install script)</a>, the user stated their solution included:
<em>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.</em>

Here, <a href='' target='_blank'>403 Forbidden for install.php</a>, the user's solution was:
<em>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).</em>

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.
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.

Arnel C.
42,973 Points
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.
22 Points
2013-08-30 6:27 pm EST
Like this Question?

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

Need more Help?

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:
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!