Start up the following command, wordpress in the local environment.

php wp-cli.phar server --host = --port = 8080 --path = web

At the same time, "SiteGuard WP Plugin" (https://www.jp-secure.com/siteguard_wp_plugin/)
I changed the login page of the management screen using
The changed URL did not work.

If i change your login page,
htaccess directly under public was written as follows,
Even if this is described, the login screen can be displayed by accessing/wp-admin /.

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase/wp /
    RewriteRule ^ wp-signup \ .php 404-siteguard [L]
    RewriteRule ^ wp-activate \ .php 404-siteguard [L]
    RewriteRule ^ login_0901 (. *) $Wp-login.php $1 [L]

I'm wondering if mod_rewrite isn't working,
Will mod_rewirte be enabled on wp-cli.phar server?

  • Answer # 1

    If you read the description of wp-cli Server command (wp-cli/server-command)


    Uses php -S to launch a web server serving the WordPress webroot.http: //php.net/manual/en/features.commandline.webserver.php
      Importantly, PHP's built-in web server doesn't support .htaccess files.If this is a requirement, please use a more advanced web server.

    It is written

    The answer is listed on the second line, but it translates as follows:


    Use php -S to start the web server that provides the WordPress directory. http://php.net/manual/en/features.commandline.webserver.php
      [Important]The PHP built-in web server does not support .htaccess files.If you need this, use an advanced web server.

    In other words, when URL rewriting such as mod_rewrite is necessary, it is necessary to prepare a web server that can rewrite URL such as Apache http server and nginx + php-frm.

Related articles