从 www/html 文件夹中安装 Wordpress

Install Wordpress out of www/html Folder

我想要一个使用 wordpress rest api 的单页应用程序 angular。我在 /var/www/html 文件夹中安装了 angular 应用程序。但是知道没有人应该公开访问 wordpress 这个事实我应该在哪里安装 wordpress?可以将它安装在 /var/www/html/wordpress 文件夹之类的地方吗?我有一个 ubuntu VPS 和 apache2

是的,我们可以在任何文件夹中安装 WordPress,wordpress 会根据您的安装文件夹自动创建 site_Url 和站点路径。但是在 Apache 根文件夹之外你不能,因为 WordPress 基于 PHP 代码,Apache 需要 运行 服务器脚本语言(PHP)。在 /var/www/html/ 里面。 ./.../.../wordpress 任意文件夹