Wordpress 403 error when moved site to another host - wordpress

I restored my files and database to new hosting. But when I try to access my blog I get the following error:
Forbidden
You don't have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Its been 6 days now I have been trying to fix this issue. Please help.

For me it was this line in .htaccess (it selects the php version to be used):
AddType application/x-httpd-php54 .php
I just comment it out and it worked after that.

Look in your wp-config.php file. Make sure that everything points to the new hosting addresses and logins and nothing refers to the old hosting.
Also be sure that there are no cached files you're transferring over through FTP.
Lastly once the site resolves the 403, be sure your CSS files (depending on what plugins you're using) all point to the proper path of your new hosting.

Related

Receiving a 403 Forbidden on static files but I can't use SSH

I've been looking around for hours on how to fix this. Every answer I look at involves using a cli to assign permissions and change user groups and the like. Unfortunately, my host will not allow me to use SSH so all I can do is use the Plesk 12.5.30 cpanel. This means my options are very limited in terms of problem solving.
So far I have tried assigning 755 permissions to everything via my FTP client, creating a new FTP user, and moving the forbidden file to the root
Relavent info:
the only forbidden file is my main css file
the files are sitting in a subdomain
creating a blank HTML template file via the cpanel in the same folder as the css file does not throw a 403
putting the css in a style tag in the HTML template causes a 403
I hate my host but I can't switch
Is there anything I can do short of pleading with my boss' boss to change hosting providers?

Error establishing database connection if i dont type https before domain

Site worked properly till recently when i got EEDBC error. Accidentaly realised that i can get to ebsite only if I type https before domain. What could be the problem? (And solution, of course)
You need to pay close attention to whether the URLs that you found have www. included. If your database includes a URL without it or vice versa, then this needs to be changed to match your database.
Check the wp-config.php file in your directory and change it. Without seeing the config file I could not answer the exact answer.
The prolem was, that my hosting provider moved directory from subdirectory to root folder on their own without notice

Symfony2 assests in bundles directory 404 error

After doing some research, I still cannot understand why my assets in the bundles folder return 404 errors when I try to reach them.
I can see the files on the server, but when I try to reach them, symfony returns a 404 error.
For example, I have this file on the server : web/bundles/aluser/images/li-plus.png, but trying to access it with https://my-site.com/bundles/aluser/images/li-plus.png returns a 404 error. But on the other hand I can access files in https://my-site.com/images/li-plus.png for example.
I did the assets install and dump commands, cleared the cache but no results.
Thank you.
Unless you are on a local install it probably has to do with your server not pointing to the web folder. I had that problem on a shared hosting what i did was to make a symlink from server home (www, public_html or whatever) to web and it worked like a charm.
Thank you all for your answers,
they pointed me in the right direction (a problem with the server) :
I did a asset install and dump commands with the root user of the server, all files created were then associated to this root user, and apache wouldn't serve them anymore.
After a chown, everything was working again.
Thanks again :)

A Deleted file loading with a url without www in it. how to get rid of that file being accessed?

My website is loading same files with www and without www. I just deleted the file from file manager and its showing 404 which is fine but a different version of it is loading
https://ospreyhomes.ae/wp-content/uploads/2015/01/logo.png (Delete but loading over without www domain)
https://www.ospreyhomes.ae/wp-content/uploads/2015/01/logo.png (Deleted - 404)
How can i get rid of the https://ospreyhomes.ae/wp-content/uploads/2015/01/logo.png being accessed on internet. i have already deleted the file
Same things goes with these 2 files. File deleted but being accessed with url without www
https://ospreyhomes.ae/wp-content/uploads/2015/01/logo.png
https://www.ospreyhomes.ae/wp-content/uploads/2015/01/logo.png
Its almost happen to any file when you have cdn cache service enable like cloudflare. Make sure you clear your browser cache. Try F5. Even not working,Then try a proxy browser to see real-time status of file or disable cloudflare while editing files.
From my side,i see your file has been deleted.

Drupal Export of Site Not Working For Subdirectory Levels Beyond Root Directory

I have to move an existing Drupal site from one server to another. I've done so by doing a mysql database export/import and copying over the files to the new server. On the new system, the root page comes up fine but if I try to go to any deeper directory levels I get a 404 Not Found Error.
so drupal.newserver.com -> works fine
but drupal.newserver.com/user -> gives me a 404 and happens,same for all subdirectories
Is there something that I'm missing that is part of a drupal export? Could it be related to the structure of the /sites directory which is under the webserver's docroot?- which has a folder named after the old server (ie drupal.oldserver.com but not drupal.newserver.com? Also, I noticed that there are _htaccess files and .hta files but not .htaccess files in the site files that I've copied over.
Sorry if I'm asking a bleedingly obvious question - I'm very new to Drupal. Thank you!
Check whether the clean url is enabled in your web server. To check try this:
drupal.newserver.com/?q=user.
Just to let anyone who might come across via a google search - I was able to get this to work . It turns out that while mod_rewrite was enabled, what I had to do was to enable the AllowOverride directive for the web directory in httpd.conf to be set to ‘All’. If it’s not set to this, the server won’t respect the .htaccess rules you put into the drupal directory. It’s been a while since I’ve worked with apache config files so it took a while to finally piece it together. The main breakthrough came when I realized that if I turned off clean-urls then the links worked but looked ugly and then was able to research clean_url.

Resources