http://localhost forced into https://localhost when accessing duplicated wordpress site - wordpress

I am using Duplicator Pro to duplicate a wordpress site from cloudways to my localmachine. After I finished the duplication process, and I enter http://localhost/mysite in the browser, the browser (both Chrome and Safari) change the protocol from "http" to "https", and ofcourse, it can't find the site. Has anyone run into this problem. And it only happens for this particular "mysite" wordpress directory. I have various wordpress folders in my ~/Sites/ folder in my Mac, but I can access all the other wordpress sites locally with http://localhost . But I cannot access this particular "mysite" wordpress directory with just "http". Is there some kind of file that perhaps Apache is looking into that says to redirect http to https when this particular "mysite" is being referenced?
Thanks

Check in the database if site url or home url has https. and try disabling all plugins.

Related

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.

CNAME links to WordPress blog but redirects cgi-sys/defaultwebpage.cgi

I've got IIS hosting site(www.site2.com) and wanted to add wordpress blog site on this website, but wordpress is PHP based so I used a tricky way.
I've got PHP hosting site(www.site1.com) so set up self-hosted wordpress blog on this site then adding CNAME on site2.com domain, I believed it should work.
So, installed wordpress in PHP hosting site(cpanel hosting) and create blog site on this wordpress, the url is www.site1.com/blogb. Then created subdomain from cpanel(blogb.site1.com) which linked to www.site1.com/blogb as root folder.
When I go to blogb.site1.com, it's working so good.
One last thing what I did is adding CNAME from site2 zone manager.
blog.site2.com -> blogb.site1.com
I think this should work because blogb.site1.com is working properly.
But when I go to blog.site2.com, redirected to "/cgi-sys/defaultwebpage.cgi" page then showed "SORRY ... If you are the owner of this website, please contact your hosting provider" message.
I cleared cache from my browner and tried from other browser but didn't work.
And added rewrite rule on .htaccess file on site1.com root folder but nothing worth.
I checked site URL from wordpress settings page, the site address(URL) was "blogb.site1.com" which was correct.
I believe if destination url of CNAME is working, the CNAME should work.
But when I try to access a file in destination folder using this url, blog.site2.com/readme.html, returns 404 not found while blogb.site1.com/readme.html is working.
So, CNAME(blog.site2.com) seems be pointing wrong directory.
Is there anything I missed or did wrong?
Thank you,
B

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

WordPress Installation transferred to Localhost issue

Maybe this is not a pure programming question.
I moved a copy of the wordpress installation from the webhost and put into my localhost.
And then I opened the web page from the localhost. when I hit the button of Login to Wordpress admin panel, I expect the path would
http://localhost
but I got
http://www.mywebhost.com/
I don't where I have to changed on the files so everything in the Wordpress would not pointed to my localhost instead of the webhost
Read the official Moving Wordpress article, it says some steps you need to do when migrating the site like going to the Administration → Settings → General and update the values of Site address (URL) and WordPress Address (URL) to the correct domain.
If it doesn't work, you'll need to replace the content of the DB to the new domain.

Drupal Multisite, MAMP and SVN Best Practices?

I successfully set-up Drupal Multisites with:
site1.domain.com
site2.domain.com
site3.domain.com
using Virtualhosts and editing the etc/hosts with MAMP on my localhost. I then deployed it using SVN (it deploys automatically) on the live site.
The Problem: when I type "Site1.domain.com" because it goes to my localhost instead of my live site. Is there anyway to avoid this? (apart from renaming the subdomain, because it speeds up deployment)
Just check your virtual host settings in httpd.conf file, are you using IP address to redirect them?
And if its directing to your localhost, just check your host file, if might be redirecting because of that

Resources