首页 > 编程语言 >Mac install Php and Wordpress

Mac install Php and Wordpress

时间:2022-12-27 07:11:40浏览次数:40  
标签:index php httpd Mac Wordpress usr install Php local

 

1. 安装php,参考:https://kittmedia.com/en/2021/macos-install-nginx-mysql-and-php-via-brew/

     brew install [email protected]

     below is the finish output:

To enable PHP in Apache add the following to httpd.conf and restart Apache:
    LoadModule php_module /usr/local/opt/php/lib/httpd/modules/libphp.so

    <FilesMatch \.php$>
        SetHandler application/x-httpd-php
    </FilesMatch>

Finally, check DirectoryIndex includes index.php
    DirectoryIndex index.php index.html

The php.ini and php-fpm.ini file can be found in:
    /usr/local/etc/php/8.2/

To restart php after an upgrade:
  brew services restart php
Or, if you don't want/need a background service you can just run:
  /usr/local/opt/php/sbin/php-fpm --nodaemonize

 

标签:index,php,httpd,Mac,Wordpress,usr,install,Php,local
From: https://www.cnblogs.com/saaspeter/p/17007254.html

相关文章