创建 Drupal 6 网站的 MAMP 本地副本

发布于 2024-12-10 04:01:04 字数 649 浏览 0 评论 0原文

我们目前正在对我们的客户进行品牌重塑,现在是将新品牌带到他们的网站上的时候了。
除了主题之外,我对 Drupal 没有太多经验(我过去曾为 Drupal 网站做过主题,但不太熟悉该软件的内部工作原理)。

由于这个网站是实时的,我显然不可能对实时环境进行任何更改,因此我已将网站的源文件下载到本地网络服务器(MAMP)。
我还有数据库的 MySQL 转储。

我不确定 Drupal 内需要更改哪些文件才能允许访问 MAMP Web 服务器。有人能在这里指出正确的方向吗?

如何将数据库连接到网站,哪些文件需要修改?
我认为客户端正在运行 Drupal 6。

更新:

我已经安装了数据库并使用以下行将其链接起来:

$db_url = 'mysql://root@localhost/databasename';

为了匿名,我隐藏了数据库名称。
由于是MAMP,数据库没有密码。当我加载网站时,出现找不到 install.php 的错误。它不存在,因为该网站已经“安装”。

我还将 $base_url 更新为:

$base_url = 'http://localhost:8888/foldername';

We're currently rebranding a client of ours and it's come the time to take the new brand to their website.
I've not much experience with Drupal other than the theming (I've themed a Drupal website in the past but not very familiar with the software's inner workings).

As this website is live, it's obviously not feasible for me to make any changes to the live environment, so I have downloaded the source files of the website to a local webserver (MAMP).
I also have a MySQL dump of the database.

I'm not sure what files need to be changed inside Drupal to allow access to the MAMP webserver. Could somebody point me in the right direction here?

How would I connect the database to the website, which files need modification?
I think the client is running Drupal 6.

Update:

I've installed the database and linked it up using the below line:

$db_url = 'mysql://root@localhost/databasename';

I've hidden databasename for anonymity.
As it's MAMP, the database has no password. When I load up the website I get an error that install.php is not found. It's not there because the website is already 'installed'.

I've also updated the $base_url to read:

$base_url = 'http://localhost:8888/foldername';

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

落叶缤纷 2024-12-17 04:01:04

您只需要修改一个文件“sites/default/settings.php”;您只需要更改其中的数据库连接字符串即可匹配您的新数据库设置。您可能还需要根据站点的设置调整其他一些设置(例如 $base_url$cookie_domain)。

除此之外,安装中的所有内容都应该是相对路径化的,因此不需要进行更多更改。

You only need to modify one file, 'sites/default/settings.php'; you'll just need to change the database connection string in there to match your new database settings. There may be a couple of other settings in there you need to tweak depending on the set up of the site (for example the $base_url or $cookie_domain).

Other than that everything in your installation should be relatively path-ed so there shouldn't be any need to make more changes.

情释 2024-12-17 04:01:04

几个小时后我遇到了同样的问题,尝试得到解决方案:我们必须检查数据库(在本地主机中的数据库列表上打勾)[在数据库列表后观察这一点:在此处启用数据库统计可能会导致Web服务器和MySQL服务器之间的流量过大。因此仅启用您要使用的数据库]这将成功重定向到 http://localhost:8888/foldername/install.php :D :D

i was facing same problem after couple of hours try i got solution : we have to check the DB (tick on list of databases in local host) [ observe this after DB list : Enabling the database statistics here might cause heavy traffic between the web server and the MySQL server. so enable only the db you want to use] this will redirect to http://localhost:8888/foldername/install.php successfully :D :D

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文