Migrate wordpress site from subdomain to top domain - wordpress

I'm running wordpress bitnami website on an ec2 instance, via a subdomain. I want the site to point to the top domain. I have tried to figure this out technically but no success. i.e. from new.example.com to www.example.com (default-domain)

You need add an A record for the main domain that points to the machine and then configure the domain in wp-config.php:
define('WP_SITEURL', 'http://DOMAIN/');
define('WP_HOME', 'http://DOMAIN/');
Replacing DOMAIN with the actual domain.

Related

Sub-domain as sub-directory in URL

We need solution for our new server, we have one main domain e.g. example.com and its hosted on VPS this website is in ASP.Net with blog e.g. example.com/blog , The blog is in sub-directory and using Wordpress. We got new server and we want to move our blog on new VPS so we created sub-domain on main domain e.g. blog.example.com and change the A Record in control panel and blog.example.com is working fine, but we want to show URL like this example.com/blog/ is there a any way we can show sub-domain as a sub-directory ? The main website will remain host on main server we only need to work with sub-domain. So it shows all links like, example.com/blog/post-name/
Try this in your .htaccess:
RewriteEngine On
RewriteRule ^blog/(.*) http://blog.example.com/$1 [P,L]
It uses mod_proxy (and will fail if it's not available) to reverse proxy the traffic beneath /blog/. Obviously, if you have a lot of traffic or bad connection between the two servers, you will want something that does cache, but usually works quite good.
You will probably have to set
define('WP_HOME', 'http://example.com/blog');
define('WP_SITEURL', 'http://example.com/blog');
in your wp-config.php so the internal links point to the URL you want them to work as.

Setting Up WordPress Multisite Domain Mapping in Plesk

Our intention is to create a multisite like www.example.com and than point other sites in that multisite installation
www.example2.com
www.example3.com
...
We have set up Wordpress multisite with subdirectories option and also activated Domain Mapping Plugin.
Than we created a child site via Multisite and in Domain Mapping Options we created a domain www.example2.com and conected it with child site via id.
In Plesk than we created a website for www.example2.com with no hosting option.
Also Both of domains www.example.com and www.example1.com are hosted in same server.
We are missing something any suggestion would be appreciated.
First you need create the website on wp multisite from network admin. This will be accessible at ww.example1.com/example2.
Then you need to go to admin of example2 admin and map the domain www.example2.com.
If the domain is pointing to the server where wordpress is (in your case should be as they are on the same place) the site should be available at www.example2.com

Run multiple domains under 1 wordpress instance

I have a question. I am trying to set up two domains under one wordpress instance.
For instance, I have a wordpress site on www.site1.com
I have another domain called www.site2.com. Now, I want to run the same wordpress site that is under www.site1.com on www.site2.com
I tried using the wordpress domain mu mapping plugin
http://wordpress.org/plugins/wordpress-mu-domain-mapping/installation/
But it only allows me subdomains or directories of www.site1.com
Can anyone help?
Add
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] );
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] );
to wp-config.php.
If you meant pointing 2 or more domain names to a single wordpress install, answer is yes you can but it won't work. Wordpress is designed only to host one domain name, if you point another domain name to your wordpress, it will return 404. The other way around to do this is redirect your other domain names to your main domain name (i.e. redirect website2.com to website1.com)
If you meant pointing 2 or more domain names to a Wordpress Multi site install, here's an article that will help you setting up domain mapping in your Wordpress multisite: https://rtcamp.com/wordpress-nginx/tutorials/multisite/domain-mappinng/
We need to set WordPress Multisite Network to make it work. I have successfully set my wordpress v4.1 installation to work for multiple sites and multiple domains by following this and this.
Please note that you will have to make sure editing to php files correctly otherwise that will completely crash your site if you make a mistake. Moreover a correct setting of htaccess is also important.

I need to repoint a Domain on a Names host to another server that runs my WordPress site?

I have a Domain host (JustHosts.com) that host my domain name:
mydomain.com
I have another server with a WordPress site on it which is accessed directly as:
mywordpress.com/wpsite1
I want this to be accessed via mydomain.com, so:
mydomain.com -> mywordpress.com/wpsite1
The URL should stay as mydomain.com, not go back to mywordpress.com/wpsite1.
I can add the following types of records:
A
CNAME
MX
TXT
SRV
AAAA
What should I do on my domain host to make this change?
Many thanks.
I could solve this in particular condition where we use subdomain to pointing to the WordPress site and the Wordpress site itself is installed on a host provider that is using cPanel.
Formerly I simply set CName on subdomain blog.mydomain.com to the subdomain where my Wordpress site is installed. Unfortunately this pointing was resulting a redirection like this:
http://blog.mydomain.com/cgi-sys/defaultwebpage.cgi
Searching for a solutiom then I found this documentation:
https://wordpress.org/plugins/wordpress-mu-domain-mapping/installation/
It is actually a documentation for a plugin to map any blog/site on a WordPressMU or WordPress 3.X network to an external domain. I didn't install the plugins I just marked that for cPanell users we need to put the mydomain.com as a parked domain in cPanel where the Wordpress site is installed.
So with the cPanel I uninstalled my WordPress and rearrange the installation step as below:
1. Put mydomain.com as a parked domain
2. Re install WordPress using blog.mydomain.com
Viola! The blog.mydomain.com is running the WordPress perfectly and stay in blog.mydomain.com without any error or redirection to other domain.

Wordpress Multisite stops old subdomains working

I followed the instructions for setting up Wordpress multisite using subdomains on a Mediatemple DV server with wildcard DNS and got it working fine, however, I had previously hosted subdomains setup but now Multisite stops these from working by defaulting to the multisite 'system'. How can I set up Multisite so I can choose which subdomains it uses and which ones for it to leave alone incase I need to setup a non-wordpress solution in these ones?
Please double check DNS records. The way I have my instances, is I use a wildcard on a CNAME pointing to my server (# or ip)
For subdomains that aren't apart of the "wp multisite network" I used A records pointing to the server ip. From there, those subdomains have to be parked properly. Say for instance, in WHM I create a cPanel account for subdomain.domain.com that roots to /home/subdomain/public_html - meanwhile domain.com cPanel accout roots to /home/domain/pubic_html - apache resolves both respectively.

Resources