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.
Related
I've tried researching this dozens of ways, and I've found posts that address pieces of what I'd like to do, but not the whole thing. I tried posting this on the Drupal forums as well, but my post hasn't shown up yet. I'm pretty new to Drupal and am afraid of corrupting my current site in the process.
Current setup:
I have a primary domain with several addon domains at HostGator
I want to convert one of my addon domains (call it addon.net) to a Drupal site
To test Drupal, I created a subdomain of addon.net (cmstest.addon.net) and used QuickInstall to set it up as a Drupal site
Current folder structure in HostGator:
/home1/[username]
cmstest.addon.net (contains Drupal files)
public_html
addon.net (contains html files)
What I'd like to accomplish:
I want to convert addon.net to a multi-instance Drupal site so I can have a test environment without having to maintain configuration and database changes in multiple places.
I don't want to lose the html files for the current addon.net site - if I have to back those up somewhere else just for reference, that's fine.
Ideally, I'd like to retain my current instance of Drupal as the main one and convert it to multi-instance, so I don't have to reconfigure everything from scratch.
If possible, I'd also like to retain the existing cmstest.addon.net domain as my test environment
I realize this is a lot of things, and I may have made things more difficult for myself by using QuickInstall rather than doing this manually. If it's much easier to start fresh with a manual install for addon.net and reapply all my changes once, that's still worth it if I can have a multi-instance setup with a test site moving forward.
Point all of the addon domains to the same folder in cPanel & then use standard Drupal multi-site installation techniques for the routing, i.e. the default domain plus individual folders and settings.php files for each of the subdomains.
Root: sites/default/settings.php
Domain: sites/example.com/settings.php
Subdomain: sites/sub.example.com/settings.php
Run the multi-site installation sharing the same core files, themes, & modules using this addressing format for the folders in /sites with unique settings.php files & MySQL databases (or table prefixes). You can also add unique /modules & /themes folders for each site if required.
I currently have a website up and running that is my freelancing website. What I wanted to do was create a testing subdirectory on the website.
So for example my site would be:
website.com
I want the testing site to be: website.com/test
I need this test to be private and require a password to view, as well as be a different installation of wordpress so I can manipulate it without editing my main website. Is this possible? Currently I have created a test directory from the cPanel that requires a password but it just brings me to a 404 not found page.
I would also like to create more, public, instances that I can use as a portfolio until I get more real clients. So for example I would like to have my site be: website.com/themeOne
Is any of this possible, or am I out of luck? Please let me know I would greatly appreciate any help. Anything I found found online thus far has either not been relevant or has not worked.
You can achieve this by setting up a wordpress multisite installation. I currently use this to host all my clients.
Will work like this.. Main site is website.com
Depending on how long you have had that site set up will determine whether your multisite install will be a subdirectory or a subdomain. If you have had your main site for a while it will be subdomains. ie. xyz.website.com
You will have to set up a wild card subdomain on your server though...so keep that in mind.
Here is the documentation on setting up a wordpress multisite
https://premium.wpmudev.org/blog/ultimate-guide-multisite/
You can install as many WordPress instances as you like in subfolders example.com/test/ or subdomains test.example.com in one hosting account; see http://codex.wordpress.org/Installing_Multiple_Blogs. (You are, of course, limited if your host does not support subdomains. And you may find lots of sites with lots of traffic will slow your whole hosting account.)
For these separate WordPress installs, you can use the same database; simply give each WordPress install a different database table prefix in wp-config.php. https://codex.wordpress.org/Editing_wp-config.php Or, give them all the installs a totally different databases, only limited by your hosting account.
To control access to a WordPress site, there is no need for access control in .htaccess or via Cpanel; use any one of a number of plugins that allow you to restrict access to anyone not logged into WordPress. See https://wordpress.org/plugins/search.php?type=term&q=password
And you can still control the user's role when they are logged into the site with one of those plugins, i.e. editor, administrator, etc., from within WordPress. That's because you want to give a client a Subscriber user level so they can simply login and view the site, rather than Administrator, who can see posts, plugins, etc. See https://codex.wordpress.org/Roles_and_Capabilities
There is no need for WordPress Multisite, unless you want to go that way: see https://codex.wordpress.org/Create_A_Network But be aware that MS requires more server and DNS configurations if you want to use Domain Mapping: https://wordpress.org/plugins/wordpress-mu-domain-mapping/
Goal: We have a Magento installation which contains a lot of sensitive data. We're looking to host a Wordpress installation.
Problem: Since we're installing third-party modules on Wordpress, we don't want any security issues in Wordpress to be able to compromise Magento.
I've spoken to a couple of my friends, and also had a think back to how it's been implemented in the past, but I wanted another opinion.
Since the wordpress directory will reside inside of the magento directory, would it be sufficient to chown the files inside of wordpress to a new user ("user-wp"), and then to chroot the user-wp user to the wordpress directory? Magento would then still have access to all of the Wordpress files, but not vice-versa.
Any other suggestions on how to go about implementing this would be more than appreciated! Somebody also suggested configuring a separate vhost.
Using a subdomain like blog.site.com would probably be the easiest way to set this up. All you would have to do is add a new VHost for the WordPress installation.
I don't think Chrooting would provide much security. You may also run into WordPress Plugin issues with such a configuration.
The setup is tricky. You would have to go and modify the PHP-fpm process pool and users it runs with. Then assign one pool to Magento and another to WordPress. Additionally you will also want to serve static assets & uploads from the Webserver itself.
And when you change this config you have to retest your Magento install to make sure things you didn't break anything accidentally.
Too much hassle, just use the subdomain. :)
we have a VPS for new site development, and were planning on using unique IP addresses for each new site/account so that while in development all links, URLs, etc. would be relative to the root (IP address) while in development and not need to change when going live (redirecting domain). But now our host won't allow us to purchase new IP addresses (according to worldwide shortage).
So now all new sites will be located at: http://shared.ip.add.ress/~cpanelaccount/. That means that while in development the sites are not using a root URL as we have been doing.
What is the best workflow while in development for relatively complex CMS solutions where we need to be able to confidently setup and test all links, SEF URLs, plugins, components, etc. without worrying about things getting messed up when the domain is switched (site goes live)?
Do we need to do some sort of global redirect in the .htaccess file?
Any modifications or strategies specific to Wordpress and/or Joomla installs?
THANKS!
I'd have to do an install of the latest WP to be sure, but at least with Joomla it is fairly irrelevant if you install in the root or a subdirectory. In the case of Joomla, there is only one change that needs to be made when moving from a subdirectory to the root. You'd need to change .htaccess to reflect the correct installation directory if you have enabled core SEF. Otherwise, there are no changes that need to be made at all. I am pretty sure WP is just as easy to move, but I'd have to look, it's been a while since I moved a WP site.
I have a my main site, called "mysite.com" (for arguments sake). On this site, you will find my blog and everything I do. But I am starting another site that I want to run on my domain. However:
The other site must have it's down domain name: newsite.com
If people go to mysite.com/newsite it must redirec to newsite.com
If people go to newsite.com, it must show the content of what they would see if they had gone to mysite.com/newsite in the past
So basically, I want a "page" or actually a whole section ( mysite.com/newsite/* ) to appear as newsite.com in the browser.
Why?
I want both sites to run off one drupal installation
I want both sites to look basically the same
However, keep in mind that I don't want to use a multi-drupal solution. i.e. a module that allows for more than one copy of drupal to run off 1 installation.
http://drupal.org/project/domain allows you to configure various things based on the domain, for example accessible nodes.
You can probably do the redirect with a Rewrite Rule, outside of Drupal or write a simple module that does that.
Sounds simple to do. Just install the second site using a regular multi-site installation. (Google "drupal multi-site instructions"). Then install the Path redirect module and create the external redirect to the new domain. http://drupal.org/project/path_redirect