我已成功在Windows 10上安装MAMP。我想在本地的WordPress站点上工作,并通过Git将更改提交到实时站点。(更新:我已经回答了下面我自己的问题。)
我知道一个常见的工作流是运行SQL查询来编辑www.mysite.org/internal-link/sample.html 本地主机/内部链接/示例。但是(a)不接触数据库是否更安全,以及(b)简单地注释/取消注释a中的几行是否更快。每次一个在站点上工作时,是否都有conf文件?
假设问题(1)的答案是肯定的,那么如何获得主机httpd。形态,httpd VHOST。形态,和。htaccess文件工作正常,因此如果我转到;www.mysite。“组织”;在浏览器中,它会在相应的本地文件夹(例如c:/MAMP/htdocs/mysite dev/*)中找到WP安装,以便本地WordPress;“思考”;是现场直播吗?
我正在MAMP 4.2(非pro)中运行PHP 7.4.1。当前,当我转到localhost
在打开Apache和MySQL服务器的我的浏览器中,它在c:/MAMP/htdocs/example1-local-folder-name/
. 如果我去https://example1.org/
它会进入现场。我的MAMP配置如下:
驱动程序\\etc\\hosts:
127.0.0.1 example1.org
::1 example1.org
httpd。形态:
ServerName example1.org
DocumentRoot "C:\\MAMP\\htdocs"
<Directory /> # "default" configuration unchanged
Options FollowSymLinks ExecCGI
AllowOverride None
Order deny,allow
Allow from all
</Directory>
<Directory "C:\\MAMP\\htdocs"> # This is the only line I changed
Options Indexes FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
httpd VHOST。形态:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName example1.org
ServerAlias www.example1.org *.example1.org
DocumentRoot "C:/MAMP/htdocs/example1-local-folder-name"
ServerAdmin [email protected]
ErrorLog "example1-error_log"
CustomLog "example1-access_log" common
</VirtualHost>
。htaccess(在c:/MAMP/htdocs/example1 local folder name/中):
# I don\'t know what to put here aside from the standard WP rewrite block.
# For now I have this file commented out
感谢您的指点;如果之前有人问过这个问题,请道歉。