I am trying to setup drupal to host multiple sites which will not effect each other. My pages are hosted on a shared hosting service and I only have access to cPanel.
Following the instructions on the web that I found using google, I have done the following.
Installed Drupal.
Make a directory in sites and name it demo.sharedhost.com.
Copied default.settings.php in that directory and renamed it settings.php.
Created a subdomain demo.
Deleted the demo folder from public_html
Made sybolic link public_html/demo to sites/demo.myshost.com.
When I try to access demo.myhost.com I get listing of sites/demo.myhost.com directory instead of drupal installation.
Can you please help me setup multisites?
Thank you.
Finally I found the answer. In 6th step I made a symbolic link to drupal_installation/sites/demo.myhost.com, these instructions are wrong on the internet. The sybolic link should be targeted to drupal_installation path.
So here is my final steps:
Installed Drupal in ~/public_html/drupal_path.
Make a directory in ~/public_html/drupal_path/sites and name it demo.myhost.com.
Copied default.settings.php in ~/public_html/drupal_path/sites/demo.myhost.com directory and renamed it settings.php.
Created a subdomain demo.myhost.com.
Deleted the demo folder from public_html, which was created automatically.
Made sybolic link as follow:
ln -s ~/public_html/drupal_path ~/public_html/demo
Note: If you do not have access to shell then use the following php script to make the symlink:
<?php
exec("ln -s ~/public_html/drupal_path/ ~/public_html/demo");
?>
Finally visit the demo site by http://demo.myhost.com and you will be prompted for new drupal installation.
I am explaining the steps again so someone like me will not have to waste time reading different solutions posted on the internet.
Please let me know if something is not clear.
Multi Site in Drupal
You need to make sure first if the server supports virtual hosts or not ,
You have not created the database for sites , follow that link for this,
If all went well till now to install another site you shouldnt access
demo.myhost.com
instead try this
demo.myhost.com/install.php
Related
I installed valet on Kali Linux, and pinged a test domain to make sure it's working which it is. However, after running valet park in the folder directory that I have my files. It redirects me to xampp dashboard whenever I access the route on the browser. I know very well to type the folder name followed by a .test domain. I've tried almost everything online. I see this is a popular issues and I've gone through every possible solution I see online. It's still not working, I tried to rename the index.php file in the htdocs folder which gets render automatically whenever you access the htdocs folder, now it only list the folder structure for me as a result. I tried to move the project out of htdocs still not working. I stopped apache and tried accessing it again but unfortunately I got, "This site cant be reached"
No response.. Well fortunately i was able to fix it, not sure it's the best way. But hopefully this might help someone, i configured ssl on the domain with valet using valet secure foo.bar and it automatically redirect to https. That way, i was able to escape from xampp
What I'm trying to achieve is to have a local version on my Wordpress site on Linux in order to work locally offline.
So I downloaded my Wordpress site using Filezilla and place it in the htdocs directory. On my Mac it works, I can see the errors to fix in order to adapt it locally. However on Linux it doesn't seem to work the same way. With the same version on my site, instead of going on localhost, it redirects to my live site, which is odd given that everything has been done in the exact same way on the Mac.
Then I tried to reverse the process by installing a fresh copy of Wordpress and copying my custom theme and its plugins (WPML, Custom Field Pro and so on) in their right directories. The thing is I can fix the problem with my first method but with the latter it's getting tricky.
It has to work on Linux which is the machine that will be used in the office.
What do you guys suggest me to do from there? Any information you need please let me know.
Thank you very much in advance,
Julien
[EDIT]
I have changed the first and second row of wp-options in the DB to localhost instead of live URL.
You should try to look in database, Table: wp_options.
You would see siteurl and home.
Then you should change to localhost.
An easier way than manually copying the site is using a plugin called Duplicator, which you can find more info on below:
https://wordpress.org/plugins/duplicator/
This plugin makes it vastly easier to duplicate entire WordPress sites to local machines, without worrying about manually copying the database, core files, themes, etc.
go to phpmyadmin > your database > wp_options check the first two rows of wp_options table it should be siteurl and home you'll see your live site url there replace it with your localhost directory link.
http://example.com change it to localhost/yoursite
I have a domain xyz.com hosted on a hosting platform. I used file manager of cPanel to add all my website content and the site works perfectly when I access www.xyz.com. Now, I want to host a different version of my website which should work with the address www.xyz.com/version2, where "version2" is a new folder which I would be creating into which I would be ftp ing the files of the new version of the website. Please give some pointers on how can I can achieve this, so that I will have both xyz.com and xyz.com/version2 working as I explained.
Just create new folder with version2 name under public_html directory through file manager and upload your all content through FTP to your newly created directory. Update your site setting in configuration file and check your site.
I managed to solve the issue by creating a subdomain. I referred the below article for help,
http://www.inmotionhosting.com/support/edu/cpanel/cpanel-manage-domains/creating-a-subdomain
I set up a WordPress installation for a friend under a subdirectory on my site. I have set up his domain name to point to the subdirectory of the installation (and I have his domain name registered under my GoDaddy account). I can't figure out how to configure my GoDaddy account or the WordPress installation to use his domain name for all his webpage's addresses.
For example, I want his website to display myfriendssite.com/about.php instead of mysite.com/friendswordpress/about.php
I have tried editing the .htaccess files for both my main sites directory and my friend's directory to no avail (I don't know what I'm doing). Please help!
Assuming you are using Apache, you should configure a virtual host with the myfriendssite.com and point it to the correct directory.
Because you haven't provided any example of the config code, I cannot give you specific example but please read through the apache doc for virtual host and you should find what you need. Here's the link
If you can post some sample of the relevant apache config, or specifics like sample domain and directories, I can help you more with a config example.
I have a site, www.domain.com. I want to set up a blog which runs on a same server but in different virtual directory, and have it available a the domain www.domain.com/blog.
How would I go about doing this? If it were blog.domain.com, then it would be easy, but with www.domain.com/blog I'm not so sure.
I'm using Windows Server 2008 / IIS 7.
I have already been through these tutorial but If some one has better approach please do let me know
Tutorial1
Tutorial2
You should just be able to add it to the existing site. Something like
appcmd add VDIR /app.name:/<existingsite>/blog /path:/blog /physicalPath:/<whereYourBlogIs>
NOTE: appcmd is in the %windir%\system32\inetsrv\ directory on my machine.
Able to run subdirectory on seprate virtual directory using URL Rewrite v2 and Application Request Routing
For more detail please see here link