Tech Tips

  1. ブログ
  2. 451 view

[wordpress][nginx]移行方法

Contents

参考ページ

基本は以下のページを見れば大丈夫。
以下のページでは分からない部分を補足する。
http://phono.co.jp/note/wp-wordpress%E3%82%92%E4%B8%B8%E3%81%94%E3%81%A8%E7%A7%BB%E7%AE%A1%E3%81%95%E3%81%9B%E3%82%8B%E6%89%8B%E9%A0%86_1256

php5-fpmをインストール

$sudo apt-get install php5-cli php5-common php5-mysql php5-suhosin php5-gd
$sudo apt-get install php5-fpm php5-cgi php-pear php5-memcache php-apc
$sudo /etc/init.d/php5-fpm start
※http://gerardmcgarry.com/blog/how-install-php-fpm-nginx-ubuntu-1004-server

ngixn設定

$sudo vim /etc/nginx/sites-enabled/wordpress
upstream phpfpm {
        server unix:/var/run/php-fpm.sock;
}

server{
        root /home/wordpress/www/example.com/html;
        index index.html index.htm index.php;

        server_name example.com;

        access_log /home/wordpress/www/example.com/log/access.log;
        error_log /home/wordpress/www/example.com/log/error.log;

        location / {
                try_files $uri $uri/ /index.html;
        }

        error_page 404 /404.html;
        error_page 500 502 503 504 /50x.html;

        location ~ ^.*\.php$ {
                root /home/wordpress/www/example.com/html;
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
        }

}

ダンプファイルをmysqlに繁栄する方法

$ mysql -u username -p -h localhost  < dump.sql

ブログの最近記事

  1. PlatformIO IDE for VSCode を使用して VSCode で Ardu…

  2. ROS Docker イメージで発生した GPG error の解消方法

  3. Streamlit で訪れた国を色づけした世界地図を作成できるアプリケーションを作成してみ…

  4. M5Stack Core2 for AWS – ESP32 IoT開発キットで…

  5. Udacity Self-Driving Car Engineer Nanodegree …

関連記事

PAGE TOP