Wordpress:Can't able to access Wordpress after migrate from http to https - wordpress

I am converting my wordpress site to https from http.I am using aws machine(windows OS) and i got the free ssl certificate,but when i tried to access my site it shows "Forbidden You don't have permission to access / on this server." this error message.I am tried almost all the solution(Deleting htaccess file,plugins uninstall,changing httpd.conf etc) but none of them worked.Any one help me i really need this one.

Can you try to test it by removing htaccess file?
Also from your database phpmyadmin go to wp_options table and from there verify that you have https urls.
Also if it does not works then tru to rename plugins folder and then test it.
Also add Really Simple SSL plugin and test your site.

Related

Migrating Site To Digital Ocean and having trouble with redirecting to HTTPS

I am migrating my site to digital ocean and I am having an issue with Https. I have moved the directory and the apache2 config file and mysql database. I believe I set everything up correctly but now I want to test it. I have edited my /etc/hosts file with my new ip and sitename.com. However when I try to go to my browser and look to see if the site works it keeps trying to redirect me to the https version of my site.
I have tried going to chrome://net-internals/#hsts and deleting the site but it still redirects to https. How can I test my site without being redirected to the still hosted version of my site?
Thanks!
Aside of the wp_options field, WordPress stores lot's of links 'hard-coded' which all will contain the https. You would need to do a full search and replace on the database, but be aware of serialized stuff. To to safely perform a search and replace you could use a program found on: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
Works like a charm.
Another way is by using wpcli if you have commandline access and wpcli is available. From the command line go to your root directory (containing the index.php) and type:
wp search-replace https://www.your-domain.example http://www.your-domain.example
Or type:
wp search-replace https://your-domain.example http://your-domain.example
Based on your setup up course.
Always make a full backup of your database before performing these actions, so you can restore if any problems occur.

301 redirect error with wordpress and apache

I've recently migrated a database from windows using bitnami (apache and wordpress) to a linux server (apache and wordpress). I'm able to access the website wp-admin, but every time I try to access the main site it repeatedly returns 301 errors.
I've tried disabling the .htaccess file (deleting, commenting everything out), but it still gets directed. I've disabled all plugins. I've looked into the themes I'm using but they don't have redirect url's like I've seen in other posts.
I'm wondering if the issue might be in how bitnami structures itself. the main documents are stored in website/wordpress/htdocs, whereas linux wordpress seems to store it directly in wordpress.
I've set sites-enabled home directory to
sitelocation/wordpress/htdocs
I've also set the wordpress address and site address to
http://website.com:80
What do I need to do to prevent the redirects, or set it up to work correctly?
if you haven't change your Site URL then.
Please change the Site URL and Home URL from database in wp_option table.
You need to mention new url in both section..
I had a trailing / on my siteurl which led to it not working. After removing that it worked.

Changing URL Wordpress- still not working despite checking/editing database

As much as may sound like a broken record - I changed the URLs on my WP site, and now I get a 404.
What I wanted to do:
Change site URL from www.SiteA.com to www.SiteB.com
All WP files were at the time in another directory in the same hosting account. I needed them in the root directory, accessible by www.SiteB.com
What I did:
Backed up locally and remotely - Database and files.
Edited URL's through dashboard on WP - got a login error afterward, but seemed to do it anyway.
Moed ALL old site files from root to backup folder.
Moed ALL wordpress files from original directory to root directory.
Then I got a 404 error and was unable to access WP-admin or login through the new or old URL.
What I tried to fix the issue:
Noticed http should be https - changed this in 'options' within phpmyadmin, both at 'siteurl' and in 'home'.
Still 404
Then I tried defining the db_name in the wp-config file.
Still 404
Then I gae up, changed the URL's back using myphpadmin, and moed the filed back to their original directory. Now I can login to WP as usual and eerything is fine.
Why can't I access the site when I moe it into the root directory - I thought I had all the steps right!
Thanks in adance for any help
oh..and apologies, my keyboard is missing a few keys :(
Wordpress stores url/permalinks on database field values as well, changing only the configuration files will not be enough.
I am pretty sure there are other options, on my case i use often perform Wordpress website migrations, and the following tool becomes really handy when search and replacing domains on the database records.
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
Hope it helps.
Jose
This happened to be an SSL issue where the host for our SSL certificate was conflicting with the stylesheet somehow. 0_o

wordpress "The provided host name is not valid for this server."

Moving an Wordpress SSL site to a dev server. Deleted the certificate. Change the domain name through mysql. Getting this error.
What else would I need to do to fix this? Something on my end through apache? Done this countless times with other non-ssl sites...I am missing something I know it...
Thanks guys. Appreciate your help.
This is a common Drupal error -- see https://drupal.stackexchange.com/questions/145286/what-does-the-provided-host-name-is-not-valid-for-this-server-mean .
I suspect that your web server is redirecting the request to a directory where a Drupal site is installed. Check your DNS A records and Apache configuration files (at /etc/apache2/sites-available on Ubuntu 18.04). Good luck!
Checklist While moving a WordPress installation from one server to another (different URL)
Update siteurl and home field in Database Table 'wp_options' with http version of the url.
Check .htaccess file and remove ssl redirect.
Check if any plugin is used to replace non-https url with https url. Then disable this plugin.
I just experienced this exact issue with a WordPress site and want to add a third solution on top of what #tgeller and #Bikram Pahi said.
Check that you have a self-signed certificate installed on your webserver or a purchased certificate. I solved this issue by installing a self-signed certificate and when re-opening the WordPress website, the error was no longer present.
Also, in my case, I enabled HTTPS in the site's URL settings.

Page Not Found error after adding SSL to my wordpress website

I have created a website in WordPress. For my website I have added SSL certificate. Before adding SSL it is working fine. But after adding SSL my pages are showing:
Not Found
The requested URL ... was not found on this server.
Without https (I mean http) pages are working fine but with https I am getting error.
I have installed a plugin wordpress-https also.
I Think the problem is coming from a very simple place:
Most web-servers today use a control panel and than it manges the traffic of the site (databases, requests and more).
Now, with every domain registerd in your user at the CP you have public_html folder and a private_html folder.
The public_html folder is the regular (default) folder you use and it points to http://
The private_html folder is the secure connection folder which is what you are looking for, and it is pointing to https://
So all you need to do is reinstall the wordpress in the private_html folder which is the pointer of https://
This should work for you :)

Resources