I have been trying to transfer my magento website to another domain of mine on the same hosting server.
I have searched over the Internet for this but unfortunately didn't find answer about the transfer within same hosting server. However there are a lot of solutions if someone transfer from one server to another.
I have 2 domains on a hosting server. One is mydomain.ca and other is mydomain.com, currently mydomain.ca is running and the folder of mydomain.com is empty.
What I wanna do is to run mydomain.com with the same website which is running on mydomain.ca
If anyone can help that would be greatly appreciated.
If your server has any hosting panel, then there must be an option to copy content from one place to another. You can easily copy content from current virtual host directory (say mydomain.ca) to virtual host directory of (say mydomain.com).
Then login to DB administration tool (say phpMyAdmin), select database of current website, click on operations, then click on copy database.
Then provide name of database where you want to copy existing database.
Now you have to do only 2 changes:
In core_config_data table of copied database, change unsecure base url and secure base url.
In app >> etc >> local.xml of new virtual host folder, change database connectivity details (i.e. host, username, password and database name).
Now delete var/cache, var/session folders from new virtual host directory.
That's all.
If you are planning to have them both running the same website then I think there's a simpler approach.
if your website is currently running as mydomain.ca, then all you need to do is "park" your other domain on this same account. Cpanel etc will usually allow you to do this no problem.
This will basically setup mydomain.ca as a pointer to mydomain.ca. they will both point to the same directory/document root, so you'll only have one set of files and no extra directories to worry about.
some info on doing this via some shared hosting platforms:
https://documentation.cpanel.net/display/ALD/Parked+Domains
http://support.hostgator.com/articles/cpanel/what-is-a-parked-domain-how-do-i-create-and-delete-one
Once the second domain is "parked" they will both point to the same website. If you then wanted to have them use different store fronts, themes etc, you could manage this inside magento without the need to change anything else on the hosting side of things.
Related
I built a website (localhost) using PHP and HTML through XAMPP. Now, I want to publish it online (webhost), available to everyone. What should I do? Thanks in advance!
First you need a host to upload your files. For this purchase hosting space from godaddy, bluehost or someother provider. You need to purchase a domain too. After domain and hosting space, if you have purchase linux hosting, then 90% chance is that you will get a cpanel. So log into your cpanel then navigate to 'public_html'. Inside this, using some ftp client like filezilla, or cpanel's build in upload feature, upload all your files. If your website needs a database, then you need to create a database, add database user and password using database wizard tools in cpanel.
When you will purchase a hosting, these things will be very clear once you login and expore a little.
Moving a website to another host consists of the following steps:
Moving the website's files.
Moving the website's database(s) (if any).
Configuring your application to work at the new host.
Pointing your domain's DNS to the new host.
A more detailed breakdown of these steps can be found below:
Transferring the files to the new host
The most convenient way to transfer your website's files to your new web hosting account is via FTP. You should connect to your hosting account and download the files locally to your computer. Then you have to upload them to your new hosting account's main folder (usually public_html, www or httpdocs).
More information on how to use FTP can be found in our FTP tutorial.
Transferring the website's databases
You have to export the database content from your old hosting account (usually into an SQL file), create a new database at your new hosting company and import the information in it. For detailed information on how to import/export databases via phpMyAdmin you can refer to this tutorial.
Application setup on the new host
This really depends from the website application that you are using. For step-by-step instructions on how to reconfigure some of the most popular applications
Check this out https://www.heroku.com/. The website will update as you push your code to the git. It's free, easy to use and good for small project.
I have a client who wants me to update their Drupal site. I've never done this before, and I want to work on it from my local machine just in case something goes wrong. I have no idea where to even start!
First off, how do I access my client's site files so I can get them onto my computer? I've tried entering the information the client gave me into Cyberduck, but it won't give me access. Is there another way to get access?
Also, how do I host it locally? I have XAMPP, but I'm not sure how to use it.
That being said, I have found a few forums that should help me set up the local server. I just don't know how to get the files from the live server to my computer.
I know this is a super noob problem, but I could use the help. Thank you!
Well, for the basic question, you have to get the correct credentials from your client. There's no alternative, really :D
While you're at it, you'll want a copy of the site's database too.
For the question "how do I host it locally?" Here's how I would go about it.
Get the site into version control.
Given that you were given (S)FTP credentials, I'm guessing the site is not version-controlled. If that's correct, then that is probably the very first thing you want to do. This will allow you to keep track of the changes you've made on your local site that are different to the production version.
Create an empty directory on your computer.
Navigate to the directory in a terminal and run git init.
Add a .gitignore file to that folder (you can create your own, or use one customized for Drupal).
Download the site's files into the directory created in step 1.
Add the files from the in the directory to the git repository by running this command in a terminal: git commit -am "First commit of Drupal files to repository."
There's a good help page about working with Drupal in git on drupal.org.
Create and populate your database.
Get a database dump from the live site.
Create a new database and database user on your machine.
Import the database dump into your new database.
Record the database credentials in settings.php or settings.local.php and store them somewhere safe, preferably in a password manager.
Change the database credentials in settings.php or settings.local.php to match the credentials of the database you've just created.
(For safety and to avoid confusion, I always create local databases with a different name, user, and password than the live site has. This means if your local credentials are compromised, the live site isn't, and it means you can't connect to and change the live site's database by accident.)
Set up the webserver in XAMPP
Create a new site in XAMPP called e.g. example.local that points to the directory that contains the file index.php
Add the following line the file called /etc/hosts on your computer:
127.0.0.1 example.local
Test that this works in a browser by visiting e.g. http://example.local or http://example.local/robots.txt.
Move your local changes to the Production site
How you will be able to do this depends to some extent on your client's web-hosting infrastructure, and what version of Drupal your client uses. but in any case, you will have three separate concerns for changes you make:
Code changes
You will need to deploy changes you make to the code back to the server. Ideally you would probably do this via Git either by cloning directly into the live site or (far better!) as part of an automated build process. By the sound of it, you may just have to FTP the changes back up.
Be careful not to re-upload your modified settings.php or settings.local.php file!
Content changes
You probably have to test some/all of your content changes locally and then recreate them on the live site. Because your client may have made changes to the live site while you were working, you can't risk importing your local database into the live site.
Configuration changes
Changes to configuration should be managed in code (i.e. as part of 1. Code changes above) if that's possible. In Drupal 7, the Features module is usually the best way to accomplish this (here's an answer I wrote describing the Features workflow). Drupal 8 has the Configuration Manager. Be aware that these two tools can both be tricky to use well.
Your client needs to gave you access to the files so you can put them into htdocs on XAMPP, then you need the database (also provide by the client), start XAMPP, create a new database on localhost/phpMyAdmin and import the db of the site. On the proyect code go to sites/default/settings and change the db settings to your local settings. Then you can go to localhost/{your-proyect} and it should work.
So i am having a problem, there is a website which have been hosted on plesk and currently to access that website i have to change my hosts file in system32 folder and put the IP and website domain name to access that file. Now i want to remove that so that i can access my website without editing my hosts file. How can i do that?
Note: I didn't made those settings on that website where i have to edit my hosts file to access the website and the website is made in wordpress.
I really dont have idea what to do because i have always used wamp to use it on localhost. Please Help guys!! thanks alot.
The issue is that your website does not have public DNS records and you should create them.
As you want to host it on Plesk server let me explain on example:
Let's assume that you have created a website and called it example.com. For development and tests you used wamp server on your local machine and to reach website you edited local hosts file.
Now you want to move it to production, so what you need to do:
First you should register your domain. You can do it with some registrar like GoDaddy.
Next you need to create this domain in Pleks > Subscriptions > Add Subscription. On this step Plesk will create a DNS zone for your domain on local DNS server.
After that you have two options:
1. Allow Plesk to host and serve DNS zone. In this case you need to configure Plesk server as name servers for your website on registrar side.
2. Use another DNS server, for example provided by your hosting provider, and configure zone for your website manually.
Finally you need to wait until zone will be propagated world-wide and your website will become accessible.
You can read more about DNS here, here and here.
I am working on moving a WP site from a host that a web agent in Singapore made for a client, to my host.
The only files they were able to provide me for now is a compressed folder of what seems to be the public_html folder from the current host server. Looks like it has all the actual files, but not the original SQL database.
I am having two issues right now...
1) We do not yet have the domain. I set up a WP install on my host, and copied over the files that were provided to me. But now when I try going to wp-admin, it redirects me to the domain (which is on the pre-existing host of the web agent in Singapore). I looked in wp-config for WP_HOME or WP_SITEURL, and these values were not in the file. And since we do not have the SQL, I am not able to edit the database through SQL queries either.
2) It looks like the current config files are set to access a database on
'us-west-1.rds.amazonaws.com' (I am assuming this is the main host as well). Since I have the database host/user/password, is there any way I could use this access to download the SQL and transfer it to my server?
I don't use WP much, so any advice would be appreciated. Not sure if I could get this working with the limited access I have, or if I need to request a backup of the original SQL, or... ?
If their database server is set to accept connections only from a specific host(s) then you will not be able to connect.
But if you can, here is a detailed guide on how you can migrate the wordpress installation.
https://codex.wordpress.org/Moving_WordPress
I need to direct multiple domains to a single set of (PHP) files. So I point a domain at my server, which then goes to a single index.php file. This index.php file then detects the domain accessing it and returns the appropriate content. I do not want to add domains or set-up sites manually though as this is for a content management service. So it should be a case of a user signing up and it immediately works without me having to manually do anything. The file set must also exist only once, so updates can easily be applied to everyone.
I am currently on shared hosting, but I believe I may need to move to a VPS (running Apache) to achieve this.
How do I go about doing this?
Thanks
Unless I'm missing something about what you're trying to do, a simple CNAME DNS record may work. Just CNAME the new domain to your existing 'main' domain.
However, if you need to know what domain was requested using shared hosting this very well may not work. The catch is you would also have to setup the hosting account to accept requests from the new domain. This seems to be what you're trying to avoid.
If this is the case, you'll need a static IP, and Apache setup to accept wildcard domains and pass them to your application (index.php in this case). You may not need a VPS for this, just a relatively configurable shared hosting account.
Update: To get this working on shared hosting, check out the Apache VirtualHost directive. That's what Apache uses to setup a (wait for it) 'virtual' web server (document root, logs, etc) allowing a single server to host multiple sites. Also checkout Named Based Virtual Hosting, you'll need an account that doesn't do virtual hosting that way.
"So it should be a case of a user signing up and it immediately works without me having to manually do anything"... So you want magic. Anyways domains point to a directory so that is easy just point all domains to the same directory. PHP can examine the full URL so you can use that to select the content.
If you are using something like Joomla you might be able to customize the starting extension. For example all joomla content is stored in tables named jos_XXX.
It should theoretically be modifyable to the base table is domain_com_XXX
Maybe, but you really need to find a good programmer for this, I don't know of any systems that will do this out of the box. Maybe someone else might know of one.