1 wordpress installation 2 domains - wordpress

I have one installation of wordpress at domain1.co.uk.
I have another domain (domain2.com) and I have changed the A record so that it now points to the installation at domain1.co.uk whist keeping the domain2.com URL.
My issue is when I click any links within the wordpress site the URL changes to domain1.co.uk/pagename and does not retain the .com. I know the wordpress site address is setup to domain1.co.uk at the moment but I would like to be able to retain the domain2.com when visited from domain2.com throughout the site.
Is that possible?
Any help will be gratefully received!

You will either have to use wpmu somehow (wordpress multisite has been integrated into wordpress) or you can enable the wordpress (multisite feature)[http://codex.wordpress.org/Create_A_Network].
It is as easy as:
// wp-config.php
define('WP_ALLOW_MULTISITE', true);
Then going to the network setup tool, adding some more lines to the config, adding some lines to the htaccess, and creating an upload directory.

Related

Add sites in subdomain and not under wordpress multisite subdomain

I'm confused, I have a miltisite wordpress installation but also another site managing the customer areas.
So I have the site on the main domain www.domaine.com and i installed the wordpress multisite in a subdomain: sites.domain.com
So far everything is fine, but when I want to create a site, wordpress requires me to be subject to the subdomain like this: other.site.domain.com
I tried to modify the .htaccess and wp-config.php but when I go back to the site management it redirects me to www.domaine.com without my being able to access the wordpress multisite management...
How can I create sites with addresses under the domain and not under the subdomain like this:
other.domain.com and not like this other.site.domain.com
Thanks
It's ok, I can't access for two reasons.
One my wildcard is set on other folder than wp installation (blank page on subsite create)
Two I need to set address of new site for replace domain.com/other to other.domain.com
And now I can access to website and subsite.
Thank!
Thank you for your answer, I just tested but it does not react correctly.
When I put the configuration of DOMAIN_CURRENT_SITE on domaine.com I can no longer access the settings of the multisite network, I am redirected to the purchase site which is on the domain.
Another thing, if I therefore create a site in a subdirectory and not in a subdomain with the SUBDOMAIN_INSTALL configuration false, when I type test.domaine.com a blank page appears as if there was no site or if I Type site.domain.com/test/ it works.
I cleared the caches everywhere and tried again but nothing happened.
In case I expressed myself badly,
www.domain.com = The commercial site of the company
site.domain.com = Multisite management and sample site
other1.domain.com = Customer site created from site.domain.com
thanks again

Wordpress - Moving website admin section

I have successfully moved a wordpress site from /test directory to the root, so now the website url looks like www.example.com. Fine.
However the admin section (wp-admin) still points to /test directory and so the url looks like www.example.com/test/wp-admin/...
How can I make it like www.example.com/wp-admin/...?
Please notice that I'm not interested in a simple redirection (now the customer is able to access the admin section with www.example.com/wp-admin, but then he's redirected to www.example.com/test/wp-admin/..., and it's not what he wants.
Thanks in advance
Everything is documented in http://codex.wordpress.org/Moving_WordPress
You may need to change many URLs in post/page content; if so, see https://github.com/interconnectit/Search-Replace-DB as suggested in the above Docs.
There is no need to create a new Wordpress install.
Also see http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install if you want to keep core Wordpress files and folders in a subfolder, but have the site appear to be at root for the end user.
You should not move wordpress this way. Here is what you do:
Install Clean Wordpress Installation on the new domain.
(www.original.com)
Use a plugin* to make back-up on your test domain.
(www.original.com/test/)
Install plugin* on the new domain, and restore back-up from test
domain. (www.orignal.com)
Update your style.css, header.php, index.php & footer.php if it
contains hard written links to your test domain.
You cannot simply move a wordpress installation - as most entries, links etc. are stored in the database. If you move folders in your ftp they will still point to the old database. This is why you have to duplicate your site, where the database entries will be automatically updated to your new site domain. Hard written links in any theme php files will have to be updated.
Although your problem depends on how your pointers/sites are set-up in c-panel. If you have to change pointers for your directory, you might have to back-up your website and upload it to a different domain so your new site can access the restoration back-up file via http request.
*Plugins such as wp clone, duplicator.

Wordpress - subdomain to root

I've been building a wordpress site on a subdomain while having my old website in the root directory. Now I have finished the site and would like to move it into the root. Is there a way how to 'redirect' my site so I don't need to move all the files and databases from the subdomain? The address should appear as www.myweb.com, though.
I have these folders in my FTP:
public_html, _sub, tmp
The subdomain is currently located at _sub/wc/
Thanks!
This codex article should explain the process, I've used it successfully myself several times: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install
According to wordpress you can leave your files where they are and put the following into your wp-config file:
define('WP_SITEURL', 'http://www.example.com/new/');
define('WP_HOME', 'http://www.example.com/new/');
Or you can:
In the box for WordPress address (URL): change the address to the new
location of your main WordPress core files. Example:
http://example.com/wordpress
In the box for Site address (URL): change
the address to the root directory's URL. Example: http://example.com
Take a look at moving wordpress: Moving_WordPress and editing the wp-config Editing_wp-config.php as well as Giving_WordPress_Its_Own_Directory
Wordpress gives a lot of information about moving domains etc, and it is well worth reading their documentation on the matter.
You may want to remove your old website files (it is good to have a back up of the old version anyway) so that they do not conflict (esp if they are WordPress).

Wordpress redirect to a remote url

I have two domain on separate hosting. On the first I can setup a.mydomain1.com. On the second I can istall wordpress as www.mydomain2.com/wordpress. Now I found a plugin for reidirect to an external website.
My goal is to show wordpress site on a.mydomain1.com. How I have to configure the record in the admin panel of first domain?
Thanks a lot
I think you should use WordPress Multisite.
WordPress includes new multisite features, meaning that it can run many blogs, even with their own separate domains, on one WordPress installation.

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