[英]WordPress and Node.js app on the same domain
I have a Node.Js app which runs fine once configured and started via cPanel
.我有一个 Node.Js 应用程序,一旦通过
cPanel
配置和启动就可以正常运行。 The root of the app is the '/' path, which is my domain name.应用程序的根目录是“/”路径,这是我的域名。
I also have a WordPress installation from where I fetch blog posts to my Node.Js app.我还安装了 WordPress,从那里我将博客文章获取到我的 Node.Js 应用程序。 The WordPress installation is in
/public_html
in cPanel
. WordPress 安装在
cPanel
的/public_html
中。
Before I start the Node.Js app, the WordPress dashboard is accessible via domain.com/wp-installation/wp-admin
.在我启动 Node.Js 应用程序之前,可以通过
domain.com/wp-installation/wp-admin
访问 WordPress 仪表板。 After I start my Node.Js app, the app takes over the domain and if I try to again access the WordPress dashboard, I get a 404 error.在我启动 Node.Js 应用程序后,该应用程序接管了域,如果我再次尝试访问 WordPress 仪表板,我会收到 404 错误。
Is there a way that I can run them both, at the same time, so that my WordPress dashboard is accessible at all times?有没有一种方法可以同时运行它们,以便随时可以访问我的 WordPress 仪表板?
Found a way, the trick was to simply go to a specific .php file, example:找到了一种方法,诀窍是简单地转到特定的 .php 文件,例如:
https://example.com/wp-migration/wp-admin/edit.php https://example.com/wp-migration/wp-admin/edit.php
This opens up the WordPress dashboard and is exactly what I need.这将打开 WordPress 仪表板,这正是我所需要的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.