WordPress Installation transferred to Localhost issue - wordpress

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.

Related

Wordpress using differet domain

Hello I have the following environment:
Domain A (redirect to domain B) Apache server
Domain B (separate web server where is installed Wordpress) Apache server
So if I digit the url of domain A I see the homepage of Wordpress site.
My problem is that if I click any link in the website I will be redirected to the Domain B because the site use the permalink of the wordpress installation.
Is there any chance to use the domain A name as base URL?
thanks
sorry - this question is not clear. Did you migrate the site? Or are you making a copy? Are those domains different - or maybe subdomains. Maybe try to share those domains if they are live. Hard to help if it's not clear what the question is about.
I have installed wordpress under the domain:
www.domain-a.com
I have another domain:
www.domain-b.com
that is configured to point to every single page of domain-a
so if I point to URL: www.domain-b/example-page I can see correctly the wordpress page. My problem is that if I click on every link inside this page the permalink is cofigured for domain-a so I will be redirect to the url domain-a. I need to stay always inside the domain-b url.
Is there any wordpress configuration that I can do to solve it?
I cannot reproduce the environment because is under a VPN.
Thanks

How to set up permalinks properly in wordpress?

I recently migrated from Bluehost to Digital Ocean for my hosting. The only problem is I was using the HTTPS while I cloned the site with the duplicator plugin, So after researching for a while, I was able to access my admin panel but all the links on the page seems to be messed up. Let's say mydomain.com is now currently pointing to my website and the dashboard is accessible via mydomain.com/wp-admin. but clicking any of the links on my homepage exposes my IP address and takes me to 139.59.xx.xx/any_internal_link. How can I fix it?
check you wp_option table for siteurl and home value, update it with your new site URL if needed
go to your dashboard, permalink, and hit the save button (without changing anything)
if you configured yourself your apache/nginx vhost, please post your configuration.

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

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.

Reverting the WordPress site name to localhost

I am a WordPress beginner and in the dashboard, under Settings --> General I changed WordPress address (URL) to http://a.com and Site Address (URL) also to http://a.com just in the curiosity to try the feature unknowing of the fact that it will lock me out.
I am using xampp for a localhost environment.
The canonical article to resolve this problem is on the WordPress website.
If you have a local copy of the website, you can edit your wp-config.php file and upload it to the site. Or, if you have SSH access to your site you can use a curses-based text editor such as Nano to make the necessary amendments remotely.
You need to override the domain settings you have made, and you can do so using this code:
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
Upload this file if necessary, and then refresh your admin screen. You may have to log in again. Once you get access to your control panel, fix your incorrect settings. You can then revert the changes to your wp-config.php file.

Wordpress Multisite: Mixing IPs, domains and URL Proxies

Our company is trying to transition to WordPress Multisite but we have several issues working against us at the moment. We host WP outside our server environment (we use Amazon for our WP sites) so we actually have to use an URL proxy to our Amazon servers. The other issue is that we needed to install Multisite in the root of the folder so the domain is http://100.10.20.30/foldername but we can't proxy that to http://www.domain.com/foldername because that is a live site that we're not moving to WP any time soon. So, of course, the problem we're running in to is that the IP is showing up not only in the source code but in Google now as well (which we don't want).
Does anyone know of anything we can do to keep the IP out of the source code/Google? I was thinking about rewrite rules in the htaccess file but didn't want to do anything until I had some better ideas.
Also, I can't use the domain mapping plugin that everyone seems to suggest for this type of issue because our sites aren't hosted in the root of our server (a prerequisite for the plugin).
So to break it down, this is what we need:
Multisite Parent Blog <-- This has to be the IP address
Multisite child blogs <-- Domain name but when we set the actual proxied domain name in the settings we get a 404 error because it's not looking in the right place. It's looking for an actual folder on our internal servers.
Thanks!
Found the solution myself. Posted below:
In the Multisite dashboard, click on "All Sites" then administer the specific site.
Under the "Path" field, you'll need to deselect the "Update siteurl and home as well."
Save changes.
Click on "Settings" tab.
Change the URL in the following fields: "SiteURL" and "Home"
Save changes.
When all is said and done, the IP is showing in the "Info" tab but it changes the URL in the source code to your domain.

Resources