Drupal multi-site single code base other domain name pointing - drupal

I have a Drupal multi-site setup using a single code base.
I have a site running in /home/drupal/sites/wxyz.com
I want to point another domain name to the same site(same content). The domain is wxyz.net.
Do I make a copy of entry for wxyz.com in the vhosts file and copy it for wxyz.net ?
Do I need a symbolic link for this also?
I don't want an entire new site for wxyz.net, I just want the domain to point to the .com.
thanks

If both sites share the same content you don't need to do anything but set up the vhost. If you have different content you will need 2 different settings.php files.
You should not need to set up a symlink in either setup.

Related

WordPress multi-site in a subfolder on host

I'm wondering about a WordPress multi-site installation and nothing I've come across has clearly laid this out for me. I'm hoping to get a little more clarification on what exactly will happen in my WordPress/Server instance if I set up a multi-site.
I've currently got my actual site as a single instance Wordpress install at the root of my domain. I'd like to keep it that way.
I've set up a sub-folder on my site called "client-login" and it has it's own WordPress install. The idea is to make this WordPress instance a multi-site one. With the intent being that I can have multiple sites in there and give access to them as needed.
So far it all is making sense but when I go to actually complete the multi-site install it says the server address will be my domain at root level. It doesn't say domain/client-login.
My question is if I turn on the multisite will it take over the root of my domain and include my "real" site as part of it?
lets consider,
you have a main wordpress domain at public_html/
you have created a subfolder in host like public_html/client-login for another wordpress instance
these two will behave as a separate sites.
The wordpress multisite will work inside the public_html/mainsite not outside of it, and it wont affect the client-login subfolder.

how to move wordpress from root to a new directory on hostgator?

Iam using hostgator and I want to move my wordpress application from the root directory 'home/username/' to a new directory which is 'home/username/mysite' and the website url should be mysite.com, I tried to do that but now my website url is mysite.com/mysite, so what I could do ?
Unfortunately, Hostgator cPanel does not allow you to change the root folder of the primary domain to anything other than the default public_html folder yourself. If you really need to do it, you need to contact their migrations department. Also, please note that this only works for a VPS or a Dedicated server.
There is, however, a workaround to avoid going through this process to achieve the desired result:
Change the primary domain name on your Hostgator account to something else. (mynewsite.com)
Now create an add-on domain with the original domain name. (mysite.com)
Point the add-on domain mysite.com to the new folder that contains the Wordpress installation. (home/username/mysite)
Your original domain name will now point to the new folder as you desired.
It's not pretty, I admit, but it gets the job done.
Not supported by Hostgator. Please read this

Wordpress, hosting a live project from a local one used on xampp

What sort of variables do I need to change to host a wordpress project from a local one that was created by a third party on a live domain?
Apart from changing the datbase in wp.config, what do I need?
Thanks
You're basically changing servers (local to live) and domains (localhost to a new URL).
Copy your WordPress files to the new server.
Export your database (you can use phpMyAdmin on XAMPP) that you've used for the installation. Do a find and replace for the old domain to the new domain. This will fix image links as well if you have any posts with images.
Because you'll have a new database, you'll also need to change wp-config.php to reflect the new credentials for your live database.
Since you're copying over files, your .htaccess will be replicated and you shouldn't need to reset permalinks. Let me know how your move works out and if any issues arise.

Using .htaccess to redirect subdirectory and contents to subdomain

I want to take some subdirectories I have on a single domain and redirect them to a subdomain that matches the subdirectories name.
Fore example if I have:
http://mysite.com/books
http://mysite.com/games
http://mysite.com/another
And if each of those subdirectories will have files, folder, etc beneath them:
ex: http://mysite.com/books/fiction/bookname
I want to be able to access those items and the items within them like so:
http://books.mysite.com
http://books.mysite.com/fiction/bookname
Same for any other items I may define like:
http://games.mysite.com
http://whatever.mysite.com/afolder/more/content
I believe I can do this with .htaccess but I'm not entirely sure on the correct code or how to have it cover all the items within the folder. I could figure out how to do each individual item manually, but that wouldn't be helpful since I'd have to do it for hundreds of urls.
EDIT: To expand more on my setup and goal -
I tried the answer of directing the domain to point to the subdirectory when setting up the domain, but it doesn't work.
Here is more info on how my site is setup. On the main domain is WordPress set up as a WordPress MU install. I KNOW that I can set this up using subdomains with a wildcard entry to my DNS to save myself this headache, BUT my host doesn't allow it and would require me to buy a private server, which I'm not interested in right now since this is more of a test/personal project than anything else and wouldn't garner enough attention/traffic.
So, I've set up WordPressMU to create subdirectories for each of the new sites I add. Right now I have 5 total. The main site (which will be for presenting updates from the four other subsites), and then four subject specific sites. I want the sites to be able to be accessed and browsed by their subdomain, and not the subdirectories. So I really think .htaccess is the route I would have to take since I can't set up my subdomain to point to a directory that doesn't really exist.
PS Thanks in advance for any/all help and suggestions. It is really appreciated.
it's enough to make the subdomain and choose subdomain's root folder the "books" folder

Changing base domain / allowing multi base domains

I have a new client that I am converting over to Drupal from Wordpress. We have two domains with the same name but different TLDs i.e. .com & .org. We have decided to start by setting up the site first under the .com so we have a live site to play with during the development.
So we currently have a wordpress site running on the .org and drupal (on a new host) running on the .com domain.
So two questions:
Can and How do you configure Drupal to work for both the .com and the .org ?
Can and How do you change the base domain drupal is configured with after the site is live ?
If you aren't using Drupal's multisite system (that is, the site information is being put into sites/default instead of sites/example.org or sites/example.com), this is really easy: do nothing. There is no step 2. Drupal will handle any domain thrown at it: just use your web server's name-based handling to determine which domains to accept.
If you are using Drupal's multisite system, it's a little harder:
Rename the sites folder (so from sites/example.com to sites/example.org).
Drupal's files table hardcodes the files directory it uses, so you're going to need to change all the paths in it. Run UPDATE files SET filepath = REPLACE(filepath,'example.org','example.com') on the database.
The other place to change the path is under Site Configuration -> File system.
The final place you're going to need to change paths is going to be on the settings page for your theme if you decided to use a custom logo or favicon.
Once you've changed all the paths, rebuild the cache under Site Configuration -> Performance.
This should cover most cases. Check with the third-party modules you're using to see if they also hardcode filepaths. If the modules are using the API correctly, they should've been handled in steps 2 and 3.
Because of all the hardcoded file paths, I highly recommend not using multisite unless you really need to. If you are only running one site in a Drupal install, just stick the site in sites/default.

Resources