I have a drupal installation in root/httpdocs and want to make a copy of it for development purposes in root/testsite. I have created the folder, copied the website files from httpdocs to testsite and setup a domain pointing to that folder. However, when I visit the page I get "This webpage is not available".
When I try to ping it, I get "unknown host".
Can anyone point to the problem? .htaccess? dns?
You need multiple virtual hosts.
If your using a localhost see: Creating Multiple Virtual Sites on a WAMP Server Installation
Or for a Debian solution see: Hosting multiple websites with Apache2
Related
I installed a Wordpress website with the wordpress Docker image, and then installed my themes. All works well, but when I want to update Wordpress later on, I get this message:
To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.
The Wordpress container is not running an FTP server on the web root. How could I solve this problem?
PS: I have my web root in a data container, shared among different containers.
PS2: I am planning on storing several Wordpress websites in the same host. Is there also a solution that is compatible with this?
The key is to make sure your web server is the owner of the directory WordPress is installed in (and its sub-directories). You're seeing an error because your web server doesn't have the proper privileges to write to your directories.
I recommend running a chown -R user:group /path/to/wordpress, substituting the user and group with your server's info.
What I want to do > I need to run a version of my live website on my local machine.
Why I need to run it on local machine I need to edit the website on my local machine and when everything is perfect copy it onto server. So I can easily make changes to the website without scaring of breaking the live website.
Whats the problem > I could run it on my local machine but when I log in to wordpress from localhost it redirects me to the live server.
What steps did I followed > I followed this question, installed mamp and downloaded whole wordpress directory to htdocs directory of mamp, then exported the database on server and imported it to my local server. Ran the server, entered username and password and was redirects to the live server rather than running the website on my local machine.
The code is the same, you just have to edit the database configuration of localhost and change domain to localhost.
tl;dr:
run this to fix it: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
long answer:
Most importantly, the "Home URL" and "Site URL" on the Settings -> General need to be changed. Also, many other URLs are saved into the Database including the domain name. Since some of them might be php-serialized, just search/replace in the database might screw up some things.
The Wordpress Codex has lots of info on moving / clonign a site. Still, the easiest way is the tool from tl;dr above.
I have a wordpress site hosted on WAMP on my local PC. I want other people on my network to view this website but when I tested it from another PC none of the stylesheets, scripts etc are being loaded. I troubleshooted it and found this is because it's looking for those files on localhost. How can I change it to look for those files relative to the folder? Thanks
What you have done is a bit like moving the site to another domain. Because WP records the domain name in its database when you install it, it thinks its domain is localhost.
Now you are getting to it by lets say using your ip address 192.168.0.10 this is considered a new domain name and when it attempts to server various resources it is still using the original domain name of localhost it cannot find those resources on the other PC's.
You can find out what you need to do here on the worpress site Changing the site url
I solved this by using my IP address as the site path in Wordpress/Settings/General
I successfully set-up Drupal Multisites with:
site1.domain.com
site2.domain.com
site3.domain.com
using Virtualhosts and editing the etc/hosts with MAMP on my localhost. I then deployed it using SVN (it deploys automatically) on the live site.
The Problem: when I type "Site1.domain.com" because it goes to my localhost instead of my live site. Is there anyway to avoid this? (apart from renaming the subdomain, because it speeds up deployment)
Just check your virtual host settings in httpd.conf file, are you using IP address to redirect them?
And if its directing to your localhost, just check your host file, if might be redirecting because of that
i am creating multisite in drupal 6 in my local xampp server,could anyone help me to name the subfolders?
Have a look at the MultiSite HowTo's at Drupal. There is a massive collection for many different versions and environments. There is also a link to "Multi-Sites Using XAMPP on Windows XP" (can be used for any win versin)
You should name the sites folders the same as you would in production.
example.com
example2.com
....
Then make entries in your hosts file on your computer.
notepad C:\Windows\System32\Drivers\etc\hosts
127.0.0.1 localtest.example.com
127.0.0.1 localtest.example2.com
Then you can build the sites locally using the names localtest.example.com and when you move the site to a production server it will work exactly the same with www.example.com