简体   繁体   English

将magento网站从一个域转移到另一个域

[英]transfer magento website from one domain to another

I have been trying to transfer my magento website to another domain of mine on the same hosting server. 我一直试图将我的magento网站转移到同一托管服务器上的我的另一个域。

I have searched over the Internet for this but unfortunately didn't find answer about the transfer within same hosting server. 我已经在Internet上搜索了此文件,但不幸的是没有找到有关同一主机服务器中传输的答案。 However there are a lot of solutions if someone transfer from one server to another. 但是,如果有人从一台服务器转移到另一台服务器,则有很多解决方案。

I have 2 domains on a hosting server. 我在托管服务器上有2个域。 One is mydomain.ca and other is mydomain.com, currently mydomain.ca is running and the folder of mydomain.com is empty. 一个是mydomain.ca,另一个是mydomain.com,当前mydomain.ca正在运行,并且mydomain.com的文件夹为空。

What I wanna do is to run mydomain.com with the same website which is running on mydomain.ca 我想做的是使用与mydomain.ca上运行的网站相同的网站来运行mydomain.com

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). 您可以轻松地将内容从当前虚拟主机目录(例如mydomain.ca)复制到虚拟主机目录(例如mydomain.com)。

Then login to DB administration tool (say phpMyAdmin), select database of current website, click on operations, then click on copy database. 然后登录到数据库管理工具(例如phpMyAdmin),选择当前网站的数据库,单击“操作”,然后单击“复制数据库”。

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. 在复制的数据库的core_config_data表中,更改不安全的基本URL和安全的基本URL。
  • In app >> etc >> local.xml of new virtual host folder, change database connectivity details (ie host, username, password and database name). 在新虚拟主机文件夹的应用>>等>> local.xml中,更改数据库连接详细信息(即主机,用户名,密码和数据库名称)。

Now delete var/cache, var/session folders from new virtual host directory. 现在,从新的虚拟主机目录中删除var / cache,var / session文件夹。

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. 如果您的网站当前以mydomain.ca的身份运行,那么您要做的就是将另一个域“停放”在同一帐户上。 Cpanel etc will usually allow you to do this no problem. Cpanel等通常会让您做到这一点。

This will basically setup mydomain.ca as a pointer to mydomain.ca. 基本上,这会将mydomain.ca设置为指向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 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 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. 然后,如果您想让他们使用不同的店面,主题等,则可以在magento内部进行管理,而无需在托管方面进行任何其他更改。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 需要从一个域转移到另一个域 - Need to transfer from one domain to another domain 将网站从一个域克隆到另一个域 - Clone a website from one domain to another 如何使用 Magento 2 中的 sftp 将文件从一台服务器传输到另一台服务器? - How to transfer file from one server to another using sftp in Magento 2? 复制Drupal网站并转移到另一个托管和域 - Copying Drupal website and transfer to another hosting and domain 将域名从自定义网站转移到新主机上的WordPress,并使用另一个域上的现有WordPress文件 - Transfer domain from custom website to WordPress on new hosting with existing WordPress files on (yet) another domain 将会话从一个网站转移到另一个网站 - transfer session one website to another website 将页面从一个域重定向到另一个域(两个域都属于一个网站) - Redirect a page from one domain to another domain (both domains belong to one website) 在一个域上运行网站前端,在另一个域上运行网站后端 - Run front end of website on one domain and backend of website on another domain CodeIgniter 在将网站从一个域迁移到另一个域并托管时未加载 CSS 和 JS - CodeIgniter not loading CSS and JS while migrating website from one domain to another domain and hosting 如何计算来自另一个网站(完全不同的域)的一个网站的访问者 - How to count visitor of one website from another website(which are on totally different domain)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM