Redirect shows ip instead of url - wordpress

I know this question is placed many times, except my situation is different and couldn't find the right answer.
I have a wordpress installed on a path bij direct admin on 123.456.11.11/path.
My domain is registered by a other company and i did a redirect to the ip/path. That was working fine but i had to turn the mask function off because otherwise it wouldn't open a secure https location.
Now the site and the https location is working fine except that it's showing the IP instead of the URL. I wanted to add an A record by the domain hosting but i can't set an A record to a path.
The question is how can i show the url without the mask function and the Wordpress installed on a path?
Thanks in advance!

It is possible that when running the wordpress installation wizard, the url you were using had the I.P address rather than the domain name, i.e http://123.456.11.11/path instead of http://yourdomain.com/path
During the installation process Wordpress saves the url used in the options table and uses it as the base url for future operations e.g. when you create a new post or page, or use the site_url() function to generate a link.
If this is the case, assuming you retained the default table prefix, you will have to edit the wp_options table (using phpmyadmin) and update siteurl and home from the ip based url to the domain name url.
Don't forget to include the path.
This means, using your example:
change the url from
http://123.456.11.11/path
to
http://yourdomain.com/path
If you had created posts and pages you will have to update their paths also. They are found in the wp_posts table.

Related

wordpress move to localhost missing css

I'm trying to move a wordpress/buddypress web site to my local pc.
I created a virtual host with the exact same host name, copy the code and DB.
It works but every time I change the C:\Windows\System32\drivers\etc\hosts file to see the live original site, chrome miss-behave and get stuck.
So I tried to change the site domain on my local pc - I search&replace the code & db export from the site domain to my local domain (e.g. mydomain.com -> mydomainlocal.com), and I reinstall the DB.
The site is running but it seems to be missing some stuff - specifically design stuff, e.g. css is different, and logo display the site name instead of the logo.
It seems like the new domain name triggers a different configuration of the site, or a different theme.
Can someone please explain how to properly move a wordpress site localy with a local domain name?
I read some posts about this issue and it seems I was doing it right, I actually don't understand why the site looks different if I changed all reference both in the code and DB.
I'd suggest the problem lies with the fact you've performed a search and replace on the database.
WordPress serializes some data and by running a search and replace on it you'll have changed the lengths therefore breaking the serialization. Often things like theme options are stored in that way and will appear to reset when broken.
In order to update the URL you'll need a more advanced tool like: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
Further information: https://codex.wordpress.org/Moving_WordPress#Changing_Your_Domain_Name_and_URLs
First You must change domain name in database wp-options table
where option_name is suteurl and home
If not help, see in wordpress admin panel theme settings, some
themes have setting and in setting those can have url setting
In browser , in source you can find errors, and in errors you can see
not correct urls
I was able to solve it answer thanks to Nathan Dawson answer, here are the actual steps I did.
I switch back to the original DB (in wp-config.php),
setup the local host of the original domain mydomain.com (NOTE that I didn't delete the settings of the new local host - mydomainlocal.com)
In mydomain.com/wp-admin/options-general.php I changed the WordPress Address (URL) and Site Address (URL) to the new domain mydomainlocal.com
click save
After saving this settings the site redirects to the new domain immediately, but since I kept the setting of the new domain it worked, and the problem is solved.
EDIT - a quick and simple solution is simply change "siteurl" and "home" in the database table "wp_options" (through phpMyAdmin or similar)

Wordpress redirection loop

Where can I change manually the website url that is in Settings>General
in wordpress panel?
I have an issue.
I had one wordpress website in the url
79.170.40.53/theffashioneditor.com/test1/
and i wanted to transfer it to
tfeditor.com/test1/
So i packed the files from first domain server
and unpacked them to the second domain server
also did with the DB. Changed the wp-config.php with the new DB user pass and database.
Then when i tried to go to the "tfeditor.com/test1/"
it redirected me to the previous server.
I went to the previous wp admin panel and changed the HOME and URL to the new domain name "tfeditor.com"
and now im in a redirect loop whenever i want to go to tfeditor.com/test1/wp-admin it takes me to the previous domain with this path
http://79.170.40.53/theffashioneditor.com/test1/wp-login.php?redirect_to=http%3A%2F%2Fwww.tfeditor.com%2Ftest1%2Fwp-admin%2F&reauth=1
I login with my username and then it takes me to
http://79.170.40.53/theffashioneditor.com/test1/79.170.40.53/theffashioneditor.com/test1/wp-admin/
Someone can help me with this please?
As I wrote here.
Simple checklist for wordpress migration is:
edit database table wp-options and options siteurl and home there
edit wp-config.php (DB_NAME, DB_USER, DB_PASSWORD a DB_HOST)
use this replace script to replace all other occurences of absolute paths for relative path, it is enough to replace your old site name http://yoursite.com with an "/"

mapping cname to my custom domain name results in posts with cname only

I have a custom domain yourtechchick.com hosted with openshift. I have mapped Cname your-techchick.rhcloud.com to http://www.yourtechchick.com and it seems to work. But, When I click on posts, It leads to url with your-techchick.rhcloud.com/post-name . I want it to be yourtechchick.com/post-name. How do I fix this?
My permalink shows your-techchick.rhcloud.com option only. Is it possible to fix this with wordpress url and site url thing?
Also, I would like to know in detail the difference between wordpress url and site url.
I somewhere read this is where I need to change, if yes, which amongst these needs to be changed to http://www.yourtechchick.com from http://your-techchick.rhcloud.com.
and In case I mess up these settings, which file will I need to reupload through ftp client in wordpress directory?
You need to log into your wordpress admin, and change the home and siteurl options to be your custom domain, instead of the app-domain.rhcloud.com that you originally set it up with. Here is some official wordpress documentation for reference: https://codex.wordpress.org/Changing_The_Site_URL

wordpress: domain mapping and site URL display

i am a wordpress newbie and have not much experience with their settings. Basically, i have recently set up a domain mapping for an existing wordpress site that i took over and that i had to move to another host, so domain mapping seemed to be an easy option to point the old URL to the new host. I have set up the domain mapping to point to the new site from:
http://www.myOldExample.com
to the new one:
http://www.myNewWebsite.com/foldername
So far the content migration worked in wordpress. The problem is that when i type in the old URL in the browser, it redirects the old page and shows the new site for the main home section as expected, but for all the subsequent links such as About, Contact, Products etc. it shows the new URL with the subfolder path, whereas i would like them to display the old URL as the base URL, so i am not sure if i need to change anything on the domain mapping site, or does this need to be done on the wordpress side? Does wordpress offer something like a base URL rewrite? I could only find in the general settings the Site URL and Wordpress URL, but i am not sure if changing those values to point to the old URL would break the site.
Many thanks for any ideas.
I think, this is url problem. When you are migrating wordpress site from one server to another server or same server but different folder, so its create url problem like http: //theoldserver to, for example, http: //thenewserver.com is problematic. So download file from this site and put this file, where blog files placed on server. Then do step, which define on this url.
This is very handy tool
Search and Replace for WordPress Databases Script" tool that's very handy (make sure to read the instructions and have a backup of the db before using it).

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