如何将Joomla导入Azure? [英] How to import Joomla to Azure?

查看:164
本文介绍了如何将Joomla导入Azure?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在自己的计算机上创建了Joomla网站,现在将其转移到Azure.

I have created Joomla site to my own computer and now I'm transferring it to Azure.

我首先创建了一个全新的Joomla,然后将所有文件复制到服务器.

I started by creating a completely new Joomla and then copying all the files to the server.

现在,下一个任务是将现在位于本地服务器中的数据库复制到Azure.谁能帮我这个?

Now the next task is to copy databases which are now located in my local server to Azure. Can anyone help me with this?

推荐答案

我从未迁移过Joomla网站,但已经完成了许多WordPress和Drupal网站.如果Joomla或您的站点本身在其数据库中包含特定于位置的数据(即站点url,图像的非相对路径等),则在导入数据库后需要对其进行修改,否则这些步骤应照常进行.

I've never migrated a Joomla site but I've done a number of WordPress and Drupal sites. If Joomla or your site itself contains location specific data in its database (i.e. site url, non-relative paths to images, etc.) then you'll need to modify those once you import your database, otherwise these steps should work as is.

  1. 在您从Azure的App Gallery中配置的现有Joomla网站中,获取MySQL数据库的连接字符串.您可以在Azure管理门户中找到那些,单击新网站,然后单击配置"选项卡,向下滚动到连接字符串,选择显示连接字符串",然后将它们复制到要迁移的Joomla中的configuration.php文件中.完成后,您的配置文件应如下所示.

    /* Database Settings */
    public $dbtype = 'mysql';
    public $host = 'us-cdbr-azure-west-a.cloudapp.net';
    public $user = 'b62be654e222v6';
    public $password = '1f569fa9';
    public $db = 'myjoomladb';
    public $dbprefix = 'jos_';

  1. 接下来,将PHPMyAdmin网站扩展安装到新的Joomla网站.为此,请在浏览器中输入. http://myjoomlasite.scm.azurewebsites.net 其中,myjoomlasite是新joomla网站的名称.从右上角的菜单中选择站点扩展",单击库",选择phpMyAdmin,单击加号按钮,然后单击安装后出现的重新启动站点"按钮.接下来,单击人字形按钮以启动扩展程序.

  1. Next install the PHPMyAdmin site extension to your new Joomla site. To do this type this into your browser. http://myjoomlasite.scm.azurewebsites.net where myjoomlasite is the name of your new joomla site. From the top right menu select Site Extensions, click on Gallery, select phpMyAdmin, click the plus button, then click the "restart site" button that appears after it installs. Next click the chevron button to launch the extension.

下一步运行mysql备份并将数据库备份到sql文件.执行此操作时,请确保选择删除表"选项,因为运行导入"将需要删除然后重新创建每个表.取.sql文件,然后返回phpMyAdmin并导入数据库.

Next run mysql backup and backup your database to a sql file. Make sure to select the Drop table option when you do this because you run Import you will want to drop and then recreate every table. Take the .sql file and go back to phpMyAdmin and import the database.

最终部署您的站点.您可以通过两种方式执行此操作. FTP或您可以从git repo推送它.如果使用FTP,然后从Azure管理门户中站点的仪表板获取FTP信息,请使用FTP客户端连接到该FTP信息并复制文件.如果要执行git push,请单击站点仪表板中的从源代码控制发布"链接,并按照本地计算机上的步骤添加git remote,然后将文件添加/推送到Azure.

Finally deploy your site. You can do this two ways. FTP or you can push it from a git repo. If you use FTP then get the FTP info from your site's dashboard in the Azure Management Portal, connect to it using your FTP client and copy the files over. If you want to do a git push then click the "publish from source control" link from the site's dashboard and follow the steps on your local machine to add the git remote, then add/push the files to Azure.

希望这会有所帮助.

在下面编辑评论.

对于dbprefix,只需保持不变即可.当您有多个使用同一数据库的joomla站点时,将使用该参数.

For the dbprefix just leave it unchanged. That parameter is used when you have multiple joomla sites using the same database.

有两种备份方法.使用phpMyAdmin连接到数据库并备份,然后使用FTP下载文件.

There are two ways to do the backup. Use phpMyAdmin to connect to the database and backup, then use FTP to download the file.

如果您正在运行linux或mac,则这将是命令行选项

If you are running linux or mac this would be the command line option,

mysqldump --opt --no-create-db --protocol=TCP --user=${USER} --password=${PASS} --host=${DBSERVER} ${DATABASE} > ${FILE} | gzip > ${FILE}.sql.gz

这篇关于如何将Joomla导入Azure?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆