WordPress运行在PHP';s在服务器上生成


WordPress run on PHP's build on server

我在想,既然我们可以使用PHP的内置服务器在本地运行Laravel/Symfony和其他框架,难道不可以使用PHP内置服务器在当地运行WordPress吗?

我正在尝试为WordPress运行PHP内置服务器,只需尝试运行指示WordPress index.php,文档根的服务器

php -S localhost:2000 index.php

但它不起作用,并显示了一些错误,如The localhost page isn’t working和类似的错误。

有人试过这个吗?还需要更多的技巧吗?

不要在命令行中指定index.php。以如下方式运行服务器:php -S localhost:9000

运行此命令时,您应该在wordpress的根目录中。或者使用-t标志指定webroot:

php -S localhost:9000 -t <Directory Containing Wordpress>