{"id":2225,"date":"2013-10-04T14:51:30","date_gmt":"2013-10-04T19:51:30","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=2225"},"modified":"2025-07-18T05:13:33","modified_gmt":"2025-07-18T10:13:33","slug":"run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\/","title":{"rendered":"Run WordPress + W3TotalCache with LEMP on CentOS 6 VPS"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div>\n<h5 class=\"wp-block-heading\" id=\"h-status-this-os-is-no-longer-supported\">Status: This OS is no longer supported<\/h5>\n\n\n\n<p><em>This article, &#8220;Run WordPress + W3TotalCache with LEMP on CentOS 6 VPS,&#8221; covers a version of CentOS that reached end of life (EOL). It is no longer supported. As such, this guide is no longer maintained. If you are currently operating a server running CentOS 6, we highly recommend contacting <a href=\"https:\/\/www.rosehosting.com\/support\/\">RoseHosting&#8217;s fully managed support<\/a>. They can upgrade or migrate you to a supported version of AlmaLinux.<\/em><\/p>\n\n\n\n<!--more-->\n\n\n<p><a href=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/09\/how-to-install-wordpressw3totalcache-with-lemp-nginx-php-fpm-and-mysql-stack-on-centos-6-vps.jpg\"><img decoding=\"async\" class=\"alignleft size-full wp-image-2227\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/09\/how-to-install-wordpressw3totalcache-with-lemp-nginx-php-fpm-and-mysql-stack-on-centos-6-vps.jpg\" alt=\"How to Install WordPress+W3TotalCache with LEMP (Nginx, PHP-FPM and MySQL) stack on CentOS 6 VPS\" width=\"320\" height=\"275\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/09\/how-to-install-wordpressw3totalcache-with-lemp-nginx-php-fpm-and-mysql-stack-on-centos-6-vps.jpg 320w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/09\/how-to-install-wordpressw3totalcache-with-lemp-nginx-php-fpm-and-mysql-stack-on-centos-6-vps-300x257.jpg 300w\" sizes=\"(max-width: 320px) 100vw, 320px\" \/><\/a><strong><a title=\"Nginx HTTP Server\" href=\"http:\/\/nginx.org\" target=\"_blank\" rel=\"noopener noreferrer\">Nginx<\/a><\/strong> is a free, open-source, <strong>high-performance HTTP web-server<\/strong> which unlike some other web-servers, it does not rely on threaded handling of the requests but instead it uses a much more scalable event driven (<em>asynchronous<\/em>) architecture.<\/p>\n<p>This uses a very small and predictable amount of memory under heavy load. <strong>Nginx<\/strong> in combination with the simple and very robust FastCGI Process Manager for PHP (<a title=\"PHP-FPM\" href=\"http:\/\/php-fpm.org\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>PHP-FPM<\/strong><\/a>) and the world most popular database server <a title=\"MySQL\" href=\"https:\/\/www.mysql.com\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>MySQL<\/strong><\/a> can give you a lot of power and performance while still using a small memory footprint.<\/p>\n<p>The following article is all about <strong>how to install and configure <a title=\"Run WordPress+W3TotalCache with LEMP (Nginx, PHP-FPM+APC and MySQL) stack on CentOS 6 VPS for maximum performance\" href=\"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\" target=\"_blank\" rel=\"noopener noreferrer\">LEMP Stack<\/a> on a <a title=\"CentOS VPS Hosting\" href=\"https:\/\/www.rosehosting.com\/centos-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">CentOS 6 VPS<\/a><\/strong> and <strong>host blazing fast WordPress<\/strong> powered web applications.<\/p>\n<p>The article is split in the following sections:<\/p>\n<ul>\n<li><a title=\"Initial set-up\" href=\"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance#pre\" target=\"_blank\" rel=\"noopener noreferrer\">Initial set-up<\/a><\/li>\n<li><a title=\"Install and configure Nginx\" href=\"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance#nginx\" target=\"_blank\" rel=\"noopener noreferrer\">Install and configure Nginx<\/a><\/li>\n<li><a title=\"Install and configure MySQL\" href=\"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance#mysql\" target=\"_blank\" rel=\"noopener noreferrer\">Install and configure MySQL<\/a><\/li>\n<li><a title=\"Install and configure PHP-FPM\" href=\"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance#php-fpm\" target=\"_blank\" rel=\"noopener noreferrer\">Install and configure PHP-FPM<\/a><\/li>\n<li><a title=\"Install and set-up WordPress\" href=\"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance#wordpress\" target=\"_blank\" rel=\"noopener noreferrer\">Install and set-up WordPress<\/a><\/li>\n<li><a title=\"Set-up caching for best WordPress performance\" href=\"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance#caching\" target=\"_blank\" rel=\"noopener noreferrer\">Set-up caching for best performance<\/a><\/li>\n<\/ul>\n<div id=\"#pre\">Before proceeding with the installation, fire up a screen session by running:<\/div>\n<pre class=\"brush: shell; gutter: false\">## screen -U -S lemp-stack<\/pre>\n<p>Once you&#8217;re in the screen session, make sure your <a title=\"CentOS VPS Hosting\" href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">CentOS 6 VPS<\/a> is fully up-to-date by executing:<\/p>\n<pre class=\"brush: shell; gutter: false\">## yum update<\/pre>\n<p>if you have Apache installed on your VPS, stop it and remove it by executing:<\/p>\n<pre class=\"brush: shell; gutter: false\">## \/etc\/init.d\/httpd stop\n## yum remove httpd<\/pre>\n<div id=\"#nginx\"><b>STEP 1) Install and configure Nginx<\/b><\/div>\n<p>\u00a0<\/p>\n<p>enable the epel repository by running:<\/p>\n<p><em>find your VPS architecture by running <code>uname -m<\/code><\/em><\/p>\n<p>&#8211; 32bit VPS:<\/p>\n<pre class=\"brush: shell; gutter: false\">## wget -P \/tmp http:\/\/mirror.pnl.gov\/epel\/6\/i386\/epel-release-6-8.noarch.rpm\n## rpm -Uvh \/tmp\/epel-release-6-8.noarch.rpm\n## rm -f \/tmp\/epel-release-6-8.noarch.rpm<\/pre>\n<p>&#8211; 64bit VPS:<\/p>\n<pre class=\"brush: shell; gutter: false\">## wget -P \/tmp http:\/\/mirror.itc.virginia.edu\/fedora-epel\/6\/x86_64\/epel-release-6-8.noarch.rpm\n## rpm -Uvh \/tmp\/epel-release-6-8.noarch.rpm\n## rm -f \/tmp\/epel-release-6-8.noarch.rpm<\/pre>\n<p>verify everything is up-to-date<\/p>\n<pre class=\"brush: shell; gutter: false\">## yum update<\/pre>\n<p>Install <code>Nginx<\/code> via yum by running:<\/p>\n<pre class=\"brush: shell; gutter: false\">## yum install nginx<\/pre>\n<p>Navigate to Nginx&#8217;s config directory in <code>\/etc\/nginx\/<\/code> and edit <code>nginx.conf<\/code> with your favorite editor:<\/p>\n<pre class=\"brush: shell; gutter: false\">## cd \/etc\/nginx\/\n## vim nginx.conf<\/pre>\n<pre>user              nginx;\nworker_processes  2;\n\nerror_log  \/var\/log\/nginx\/error.log;\n#error_log  \/var\/log\/nginx\/error.log  notice;\n#error_log  \/var\/log\/nginx\/error.log  info;\n\npid        \/var\/run\/nginx.pid;\n\nevents {\n    worker_connections  1024;\n}\n\nhttp {\n    include       \/etc\/nginx\/mime.types;\n    default_type  application\/octet-stream;\n\n    log_format  main  '$remote_addr - $remote_user [$time_local] \"$request\" '\n                      '$status $body_bytes_sent \"$http_referer\" '\n                      '\"$http_user_agent\" \"$http_x_forwarded_for\"';\n\n    access_log  \/var\/log\/nginx\/access.log  main;\n\n    sendfile        on;\n    #tcp_nopush     on;\n\n    #keepalive_timeout  0;\n    keepalive_timeout  30;\n    server_tokens off;\n\n    gzip on;\n    gzip_disable \"MSIE [1-6]\\.(?!.*SV1)\";\n    gzip_http_version 1.1;\n    gzip_vary on;\n    gzip_proxied any;\n    gzip_comp_level 6;\n    gzip_buffers 16 8k;\n    gzip_types text\/plain text\/css application\/json application\/x-javascript text\/xml application\/xml application\/xml+rss text\/javascript application\/javascript text\/x-js;\n\n    # enabled sites\n    include \/etc\/nginx\/sites-enabled\/*;\n\n}<\/pre>\n<p>create <code>sites-enabled<\/code> and <code>sites-available<\/code> inside the <code>\/etc\/nginx<\/code> directory:<\/p>\n<pre class=\"brush: shell; gutter: false\">## mkdir -p \/etc\/nginx\/sites-available \/etc\/nginx\/sites-enabled<\/pre>\n<p>set-up default Nginx virtual host directive by adding the following in <code>\/etc\/nginx\/sites-available\/default.conf<\/code><\/p>\n<pre>server {\n    listen       80 default_server;\n    server_name  _;\n    location \/ {\n        root   \/usr\/share\/nginx\/html;\n        index  index.html index.htm;\n    }\n    error_page  404              \/404.html;\n    location = \/404.html {\n        root   \/usr\/share\/nginx\/html;\n    }\n    error_page   500 502 503 504  \/50x.html;\n    location = \/50x.html {\n        root   \/usr\/share\/nginx\/html;\n    }\n}<\/pre>\n<p>enable the default Nginx virtual host directive by creating symbolic link to the default vhost configuration in <code>\/etc\/nginx\/sites-enabled\/<\/code><\/p>\n<pre class=\"brush: shell; gutter: false\">## cd \/etc\/nginx\/sites-enabled\n## ln -s \/etc\/nginx\/sites-available\/default.conf<\/pre>\n<p>test Nginx&#8217;s configuration, add it to your system startup and finally fire it up by:<\/p>\n<pre class=\"brush: shell; gutter: false\">## nginx -t\n## \/etc\/init.d\/nginx restart\n## chkconfig nginx on<\/pre>\n<hr \/>\n<div id=\"#mysql\"><b>STEP 2) Install and configure MySQL<\/b><\/div>\n<p>\u00a0<\/p>\n<p>install MySQL database server, start and add it to your system start-up by running the following commands:<\/p>\n<pre class=\"brush: shell; gutter: false\">## yum install mysql mysql-server\n## service mysqld restart\n## chkconfig mysqld on<\/pre>\n<p>next, run the command below in order to set-up MySQL<\/p>\n<pre class=\"brush: shell; gutter: false\">## mysql_secure_installation<\/pre>\n<pre>Enter current password for root (enter for none):\nSet root password? [Y\/n] y\nRemove anonymous users? [Y\/n] y\nDisallow root login remotely? [Y\/n] y\nRemove test database and access to it? [Y\/n] y\nReload privilege tables now? [Y\/n] y<\/pre>\n<p>make sure your MySQL is not exposed to listen on your server&#8217;s public IP by adding the following to <code>\/etc\/my.cnf<\/code><\/p>\n<pre>## vim \/etc\/my.cnf\n\n[mysqld]\nbind-address = 127.0.0.1\n...<\/pre>\n<p>restart the database server for the changes to take effect by:<\/p>\n<pre class=\"brush: shell; gutter: false\">## \/etc\/init.d\/mysqld restart<\/pre>\n<hr \/>\n<div id=\"#php-fpm\"><b>STEP 3) Install and configure PHP-FPM<\/b><\/div>\n<p>\u00a0<\/p>\n<p>install <code>PHP-FPM<\/code> and some useful PHP extensions by executing the command below:<\/p>\n<pre class=\"brush: shell; gutter: false\">## yum install php-fpm php-mysql php-gd php-mcrypt<\/pre>\n<p>edit <code>\/etc\/php.ini<\/code> and change\/uncomment the following:<\/p>\n<pre>cgi.fix_pathinfo=0\ndate.timezone = America\/New_York\nmemory_limit = 64M\nexpose_php = Off<\/pre>\n<p>next, edit <code>\/etc\/php-fpm.conf<\/code> with your favorite editor and uncomment the following:<\/p>\n<pre>emergency_restart_threshold = 10\nemergency_restart_interval = 1m\nprocess_control_timeout = 10<\/pre>\n<p>with all that in place, set-up a PHP-FPM pool in <code>\/etc\/php-fpm.d\/www.conf<\/code>:<\/p>\n<pre class=\"brush: shell; gutter: false\">## mv \/etc\/php-fpm.d\/www.conf \/root\/\n## vim \/etc\/php-fpm.d\/www.conf<\/pre>\n<pre>[wordpress]\n;listen = 127.0.0.1:9001\nlisten = \/var\/run\/php-wordpress.socket\nuser = nginx\ngroup = nginx\nrequest_slowlog_timeout = 5s\nslowlog = \/var\/log\/php-fpm\/blogcms.log\nlisten.allowed_clients = 127.0.0.1\npm = dynamic\npm.max_children = 10\npm.start_servers = 3\npm.min_spare_servers = 2\npm.max_spare_servers = 4\npm.max_requests = 400\nlisten.backlog = -1\npm.status_path = \/status\nrequest_terminate_timeout = 120s\nrlimit_files = 131072\nrlimit_core = unlimited\ncatch_workers_output = yes\nphp_value[session.save_handler] = files\nphp_value[session.save_path] = \/var\/lib\/php\/session\nphp_admin_value[error_log] = \/var\/log\/php-fpm\/wordpress-error.log\nphp_admin_flag[log_errors] = on<\/pre>\n<p>restart PHP-FPM and add it to your system startup:<\/p>\n<pre class=\"brush: shell; gutter: false\">## \/etc\/init.d\/php-fpm restart\n## chkconfig php-fpm on<\/pre>\n<hr \/>\n<p>at this point you should have <strong>Nginx<\/strong>, <strong>MySQL<\/strong> and <strong>PHP-FPM<\/strong> up and running on your server. Proceed with creating a vhost directive for your <strong>WordPress<\/strong> application:<\/p>\n<pre class=\"brush: shell; gutter: false\">## vim \/etc\/nginx\/sites-available\/my-wordpress.tld.conf<\/pre>\n<pre>server {\n        listen 80;\n        server_name my-wordpress.tld;\n        rewrite ^(.*) http:\/\/www.my-wordpress.tld$1 permanent;\n}\n\nserver {\n        listen 80;\n        server_name www.my-wordpress.tld;\n\n        client_max_body_size 5m;\n        client_body_timeout 60;\n\n        access_log \/var\/log\/nginx\/my-wordpress.tld-access;\n        error_log \/var\/log\/nginx\/my-wordpress.tld-error error;\n\n        root \/var\/www\/html\/my-wordpress.tld\/;\n        index  index.html index.php;\n\n        ### root directory ###\n        location \/ {\n                try_files $uri $uri\/ \/index.php?$args;\n        }\n\n        ### security ###\n        error_page 403 =404;\n        location ~ \/\\. { access_log off; log_not_found off; deny all; }\n        location ~ ~$ { access_log off; log_not_found off; deny all; }\n        location ~* wp-admin\/includes { deny all; }\n        location ~* wp-includes\/theme-compat\/ { deny all; }\n        location ~* wp-includes\/js\/tinymce\/langs\/.*\\.php { deny all; }\n        location \/wp-includes\/ { internal; }\n        #location ~* wp-config.php { deny all; }\n        location ~* ^\/wp-content\/uploads\/.*.(html|htm|shtml|php)$ {\n                types { }\n                default_type text\/plain;\n        }\n\n        #  location ~* wp-admin {\n        #      allow &lt;YOUR_IP&gt;;\n        #      allow 127.0.0.1;\n        #      deny all;\n        #  }\n\n        ### disable logging ###\n        location = \/robots.txt { access_log off; log_not_found off; }\n        location = \/favicon.ico { access_log off; log_not_found off; }\n\n        ### caches ###\n        location ~* \\.(jpg|jpeg|gif|css|png|js|ico|html)$ { access_log off; expires max; }\n        location ~* \\.(woff|svg)$ { access_log off; log_not_found off; expires 30d; }\n        location ~* \\.(js)$ { access_log off; log_not_found off; expires 7d; }\n\n        ### php block ###\n        location ~ \\.php?$ {\n                try_files $uri =404;\n                include fastcgi_params;\n                #fastcgi_pass 127.0.0.1:9001;\n                fastcgi_pass unix:\/var\/run\/php-wordpress.socket;\n                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n                fastcgi_intercept_errors on;\n                fastcgi_split_path_info ^(.+\\.php)(.*)$;\n                #Prevent version info leakage\n                fastcgi_hide_header X-Powered-By;\n        }\n}<\/pre>\n<p>enable the virtual host directive and restart nginx by running the following commands:<\/p>\n<pre class=\"brush: shell; gutter: false\">## cd \/etc\/nginx\/sites-enabled\n## ln -s \/etc\/nginx\/sites-available\/my-wordpress.tld.conf\n## nginx -t\n## \/etc\/init.d\/nginx restart<\/pre>\n<p>test PHP-FPM by creating PHP <code>info.php<\/code> script in your vhost document root in <code>\/var\/www\/html\/my-wordpress.tld\/<\/code> :<\/p>\n<pre class=\"brush: shell; gutter: false\">## mkdir -p \/var\/www\/html\/my-wordpress.tld\/\n## cd \/var\/www\/html\/my-wordpress.tld\/\n##  echo -e \"&lt;?php\\n\\tphpinfo();\\n\" &gt; info.php<\/pre>\n<p>access <code>http:\/\/my-wordpress.tld\/info.php<\/code> to test your PHP-FPM<\/p>\n<div id=\"#wordpress\"><b>STEP 4) Set-up WordPress<\/b><\/div>\n<p>\u00a0<\/p>\n<p>Next step is to install WordPress inside your vhost document root in <code>\/var\/www\/html\/my-wordpress.tld\/<\/code>. Before installing WordPress, let\u2019s first create a MySQL database by running:<\/p>\n<pre class=\"brush: shell; gutter: false\">## mysql -u root -p<\/pre>\n<pre>mysql&gt; create database wordpressDB;\nmysql&gt; grant all on wordpressDB.* to wpUser@localhost identified by 'YOUR_PASS';\nmysql&gt; quit<\/pre>\n<pre class=\"brush: shell; gutter: false\">## cd \/var\/www\/html\/my-wordpress.tld\/\n## wget http:\/\/wordpress.org\/latest.zip\n## unzip latest.zip\n## mv wordpress\/* .\n## rm -rf latest.zip wordpress\/<\/pre>\n<p>next, copy WordPress sample config and set-up your MySQL database information:<\/p>\n<pre class=\"brush: shell; gutter: false\">## cp wp-config-sample.php wp-config.php\n## vim wp-config.php<\/pre>\n<pre>define('DB_NAME', 'wordpressDB');\ndefine('DB_USER', 'wpUser');\ndefine('DB_PASSWORD', 'YOUR_PASS');<\/pre>\n<pre class=\"brush: shell; gutter: false\">## chown nginx: -R \/var\/www\/html\/my-wordpress.tld\/<\/pre>\n<p>open http:\/\/my-wordpress.tld and complete your WordPress installation<\/p>\n<hr \/>\n<div id=\"#caching\"><b>STEP 5) Set-up caching for best performance<\/b><\/div>\n<p>\u00a0<\/p>\n<p>Install PHP-APC (Alternative PHP Cache) by running:<\/p>\n<pre class=\"brush: shell; gutter: false\">## yum install php-pecl-apc<\/pre>\n<p>once APC is installed, add the following to <code>\/etc\/php.d\/apc.ini<\/code><\/p>\n<pre class=\"brush: shell; gutter: false\">## cat &gt; \/etc\/php.d\/apc.ini<\/pre>\n<pre>extension = apc.so\napc.enabled=1\napc.shm_segments=1\napc.shm_size=128M\napc.num_files_hint=1024\napc.user_entries_hint=4096\napc.ttl=7200\napc.use_request_time=1\napc.user_ttl=7200\napc.gc_ttl=3600\napc.cache_by_default=1\napc.filters\napc.mmap_file_mask=\/tmp\/apc.XXXXXX\napc.file_update_protection=2\napc.enable_cli=0\napc.max_file_size=1M\napc.stat=1\napc.stat_ctime=0\napc.canonicalize=0\napc.write_lock=1\napc.report_autofilter=0\napc.rfc1867=0\napc.rfc1867_prefix =upload_\napc.rfc1867_name=APC_UPLOAD_PROGRESS\napc.rfc1867_freq=0\napc.rfc1867_ttl=3600\napc.include_once_override=0\napc.lazy_classes=0\napc.lazy_functions=0\napc.coredump_unmap=0\napc.file_md5=0\napc.preload_path<\/pre>\n<p>and restart <b>PHP-FPM<\/b> for the changes to take effect.<\/p>\n<pre class=\"brush: shell; gutter: false\">## \/etc\/init.d\/php-fpm restart<\/pre>\n<p>check if <b>APC<\/b> is loaded by running:<\/p>\n<pre class=\"brush: shell; gutter: false\">## php -m | grep -w apc<\/pre>\n<p>or by opening the <code>info.php<\/code> script in your document root.<\/p>\n<p>Next thing to do is to login to your WordPress administration and install the <b>W3 Total Cache Plugin<\/b>. For W3 Total Cache Plugin to work you have to first enable <code>Pretty URLs<\/code> in<\/p>\n<p><code>Settings-&gt;Permalinks-&gt;Custom Structure<\/code>:<\/p>\n<pre>http:\/\/my-wordpress.tld\/%postname%\/<\/pre>\n<p>and then proceed with installing the <code>W3 Total Cache<\/code>. Once installed, go to<\/p>\n<p><code>Performance-&gt;General Settings<\/code><\/p>\n<p>and enable\/disable the following options:<\/p>\n<pre>Page cache: enabled\nPage cache method: Disk: Enhaced\n\nMinify: disabled\n\nDatabase Cache: enabled\nDatabase Cache Method: Opcode: Alternative PHP Cache (APC)\n\nObject Cache: enbabled\nObject Cache Method: Opcode: Alternative PHP Cache (APC)\n\nBrowser Cache: disabled\n\nCDN: this is up to you.<\/pre>\n<p>Click <code>Save all settings<\/code> to submit the changes.<\/p>\n<p>Add the following in <code>\/var\/www\/html\/my-wordpress.tld\/nginx.conf<\/code><\/p>\n<pre class=\"brush: shell; gutter: false\">## cat &gt; \/var\/www\/html\/my-wordpress.tld\/nginx.conf<\/pre>\n<pre># BEGIN W3TC Page Cache cache\nlocation ~ \/wp-content\/cache\/page_enhanced.*html$ {\n    add_header Vary Cookie;\n}\n# END W3TC Page Cache cache\n# BEGIN W3TC Page Cache core\nset $w3tc_rewrite 1;\nif ($request_method = POST) {\n    set $w3tc_rewrite 0;\n}\nif ($query_string != \"\") {\n    set $w3tc_rewrite 0;\n}\nif ($request_uri !~ \\\/$) {\n    set $w3tc_rewrite 0;\n}\nif ($http_cookie ~* \"(comment_author|wp\\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle)\") {\n    set $w3tc_rewrite 0;\n}\nif (!-f \"$document_root\/wp-content\/cache\/page_enhanced\/$http_host\/$request_uri\/_index.html\") {\n  set $w3tc_rewrite 0;\n}\nif ($w3tc_rewrite = 1) {\n    rewrite .* \"\/wp-content\/cache\/page_enhanced\/$http_host\/$request_uri\/_index.html\" last;\n}\n# END W3TC Page Cache core<\/pre>\n<p>make sure the ownership of the document root is ok by:<\/p>\n<pre class=\"brush: shell; gutter: false\">## chown nginx: -R \/var\/www\/html\/my-wordpress.tld\/<\/pre>\n<p>The next step is to tell Nginx to use this configuration file. Edit <code>\/etc\/nginx\/sites-enabled\/my-wordpress.tld.conf<\/code> and add\/uncomment the following:<\/p>\n<pre>include \/var\/www\/html\/my-wordpress.tld\/nginx.conf;\n...\nlocation ~* wp-config.php { deny all; }<\/pre>\n<p>test Nginx&#8217;s configuration file and restart it for the changes to take effect by executing:<\/p>\n<pre class=\"brush: shell; gutter: false\">## nginx -t\n## \/etc\/init.d\/nginx restart<\/pre>\n<p>You can also edit your WordPress configuration file <code>\/var\/www\/html\/my-wordpress.tld\/wp-config.php<\/code> and define the following so WordPress will not have to query the database for the site url:<\/p>\n<pre>define('WP_HOME', 'http:\/\/my-wordpress.tld');\ndefine('WP_SITEURL', 'http:\/\/my-wordpress.tld');<\/pre>\n<p>Of course, if you are one of our <a title=\"Linux VPS Hosting\" href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">Linux VPS Hosting<\/a> customers, you don\u2019t have to do any of this, simply ask our admins, sit back and relax. Our admins will set this up for you immediately.<\/p>\n<p><strong>PS.<\/strong> If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>","protected":false},"excerpt":{"rendered":"<p>Status: This OS is no longer supported This article, &#8220;Run WordPress + W3TotalCache with LEMP on CentOS 6 VPS,&#8221; covers &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Run WordPress + W3TotalCache with LEMP on CentOS 6 VPS\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\/#more-2225\" aria-label=\"Read more about Run WordPress + W3TotalCache with LEMP on CentOS 6 VPS\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":2227,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1709,1699,1710,1702,1704,13,1712,1707],"tags":[52,177,39,49,303,51,1152,302,148],"class_list":["post-2225","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-caching","category-centos","category-cms-crm-erp","category-databases","category-optimization","category-tutorials","category-web-frameworks","category-web-servers","tag-apc","tag-linux-vps","tag-mysql","tag-nginx","tag-php-apc","tag-php-fpm","tag-rosehosting","tag-w3-total-cache","tag-wordpress","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Run WordPress + W3TotalCache with LEMP on CentOS 6 VPS | RoseHosting<\/title>\n<meta name=\"description\" content=\"Discover the benefits of using LEMP on CentOS 6 VPS for efficient web server management and performance improvements.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Run WordPress + W3TotalCache with LEMP on CentOS 6 VPS\" \/>\n<meta property=\"og:description\" content=\"Run WordPress + W3TotalCache with LEMP on CentOS 6 VPS | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2013-10-04T19:51:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-18T10:13:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/09\/how-to-install-wordpressw3totalcache-with-lemp-nginx-php-fpm-and-mysql-stack-on-centos-6-vps.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"320\" \/>\n\t<meta property=\"og:image:height\" content=\"275\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"Run WordPress + W3TotalCache with LEMP on CentOS 6 VPS\",\"datePublished\":\"2013-10-04T19:51:30+00:00\",\"dateModified\":\"2025-07-18T10:13:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\\\/\"},\"wordCount\":818,\"commentCount\":7,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/09\\\/how-to-install-wordpressw3totalcache-with-lemp-nginx-php-fpm-and-mysql-stack-on-centos-6-vps.jpg\",\"keywords\":[\"apc\",\"linux vps\",\"mysql\",\"nginx\",\"php-apc\",\"php-fpm\",\"rosehosting\",\"w3-total-cache\",\"wordpress\"],\"articleSection\":[\"Caching\",\"CentOS\",\"CMS, CRM, ERP\",\"Databases\",\"Optimization\",\"Tutorials\",\"Web Frameworks\",\"Web Servers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\\\/\",\"name\":\"Run WordPress + W3TotalCache with LEMP on CentOS 6 VPS | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/09\\\/how-to-install-wordpressw3totalcache-with-lemp-nginx-php-fpm-and-mysql-stack-on-centos-6-vps.jpg\",\"datePublished\":\"2013-10-04T19:51:30+00:00\",\"dateModified\":\"2025-07-18T10:13:33+00:00\",\"description\":\"Discover the benefits of using LEMP on CentOS 6 VPS for efficient web server management and performance improvements.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/09\\\/how-to-install-wordpressw3totalcache-with-lemp-nginx-php-fpm-and-mysql-stack-on-centos-6-vps.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/09\\\/how-to-install-wordpressw3totalcache-with-lemp-nginx-php-fpm-and-mysql-stack-on-centos-6-vps.jpg\",\"width\":320,\"height\":275,\"caption\":\"How to Install WordPress+W3TotalCache with LEMP (Nginx, PHP-FPM and MySQL) stack on CentOS 6 VPS\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Run WordPress + W3TotalCache with LEMP on CentOS 6 VPS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Run WordPress + W3TotalCache with LEMP on CentOS 6 VPS | RoseHosting","description":"Discover the benefits of using LEMP on CentOS 6 VPS for efficient web server management and performance improvements.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\/","og_locale":"en_US","og_type":"article","og_title":"Run WordPress + W3TotalCache with LEMP on CentOS 6 VPS","og_description":"Run WordPress + W3TotalCache with LEMP on CentOS 6 VPS | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2013-10-04T19:51:30+00:00","article_modified_time":"2025-07-18T10:13:33+00:00","og_image":[{"width":320,"height":275,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/09\/how-to-install-wordpressw3totalcache-with-lemp-nginx-php-fpm-and-mysql-stack-on-centos-6-vps.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"Run WordPress + W3TotalCache with LEMP on CentOS 6 VPS","datePublished":"2013-10-04T19:51:30+00:00","dateModified":"2025-07-18T10:13:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\/"},"wordCount":818,"commentCount":7,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/09\/how-to-install-wordpressw3totalcache-with-lemp-nginx-php-fpm-and-mysql-stack-on-centos-6-vps.jpg","keywords":["apc","linux vps","mysql","nginx","php-apc","php-fpm","rosehosting","w3-total-cache","wordpress"],"articleSection":["Caching","CentOS","CMS, CRM, ERP","Databases","Optimization","Tutorials","Web Frameworks","Web Servers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\/","url":"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\/","name":"Run WordPress + W3TotalCache with LEMP on CentOS 6 VPS | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/09\/how-to-install-wordpressw3totalcache-with-lemp-nginx-php-fpm-and-mysql-stack-on-centos-6-vps.jpg","datePublished":"2013-10-04T19:51:30+00:00","dateModified":"2025-07-18T10:13:33+00:00","description":"Discover the benefits of using LEMP on CentOS 6 VPS for efficient web server management and performance improvements.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/09\/how-to-install-wordpressw3totalcache-with-lemp-nginx-php-fpm-and-mysql-stack-on-centos-6-vps.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/09\/how-to-install-wordpressw3totalcache-with-lemp-nginx-php-fpm-and-mysql-stack-on-centos-6-vps.jpg","width":320,"height":275,"caption":"How to Install WordPress+W3TotalCache with LEMP (Nginx, PHP-FPM and MySQL) stack on CentOS 6 VPS"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/run-wordpress-w3totalcache-with-lemp-nginx-php-fpmapc-and-mysql-stack-on-centos-6-vps-for-maximum-performance\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Run WordPress + W3TotalCache with LEMP on CentOS 6 VPS"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/2225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=2225"}],"version-history":[{"count":3,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/2225\/revisions"}],"predecessor-version":[{"id":50815,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/2225\/revisions\/50815"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/2227"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=2225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=2225"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=2225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}