Articles of wordpress

大的RSS提要请求到不存在的URL导致404(和高负载)

最近我有一个新的网站开始完全取代以前的网站。 我们有前面的cloudflare,并将主机名称切换到新的站点IP。 瞬间我们看到负载超过了200+,并且有大约25Mbps的404 HTTP响应(我猜CPU核心最大时不会更高)。 从我可以看到有很多点击每秒rss.xml(不再存在于新的网站,而它在旧的)。 这个请求反过来让WordPress启动WP负载序列,它加载了一些插件(带有可疑的非高性能代码),每秒请求的数量很大,导致非常高的服务器负载。 今后要防止这种情况: 一个人可以通过nginx限制对这个RSSurl(或任何其他url)的请求吗? 有没有办法阻止WordPress服务器closures,如果没有find文件快速退出,而不是加载非caching页面(和所有后续的插件),以便它可以呈现404页面?

Nginx的每个使用目录的站点configuration

我有25个主机与WordPress网站的虚拟服务器。 用户需要能够访问他们的网站通过〜用户名从主域如下所示: http : //subdomain.example.com/~username/工作正常,但如果他们尝试通过添加wp-admin访问pipe理区域:〜username / wp-admin他们被redirect到: http : //subdomain.example.com/wp-admin/ 任何机会有人知道如何设置子子域,如username.subdomain.example.com? 因为一些服务不工作,如果你有〜在站点名称:( 这就是我现在在默认的nginx主机上所做的: set $root_dir /home/defaulthost/public_html/; rewrite ^(/~[^/]+)$ $1/ redirect; rewrite ^/~(?<user>[^/]+)(.+) $2; if ($user) { set $root_dir /home/$user/public_html; } root $root_dir;

WordPress,Varnish,Nginx + php5-fpm – php5-fpm发射每一个命中。

我在一个512Mb digitalocean VPS上主办一个WordPress站点。 一切都很好,清漆是一个完美的命中率。 login用户绕过。 我唯一注意到的是php5-fpm每次访问都会触发。 我怎样才能跟踪什么是pipe理绕过caching,并传递到后端。 系统负载非常好,清漆是这样一个小的VPS惊人的,但我的目标是找出为什么php5-fpm发射时,我不认为这是必要的。 谢谢

反向代理Nginx,但cookies不通过WPpipe理员

我反向代理一个博客。 它在Apache下的子域blog.example.com上托pipe。 在Nginx中,我在服务器块中有以下configuration。 除了WPpipe理面板的cookie外,其他的工作都没有通过,所以我无法login。 我应该添加什么? location /blog/ { proxy_set_header X-Original-Host $host; proxy_set_header X-Is-Reverse-Proxy "true"; proxy_pass_header Set-Cookie; proxy_cookie_path / /blog/; proxy_pass http://blog.example.com/; } 谢谢!

WordPress的更新失败 – 但为什么?

我目前正在使用WordPress的4.4我设置了后台更新,但是当我执行他们说:“出了点问题。 无法findWordPress根目录。 我设置我的FTP细节如下: define('FTP_HOST', 'mydomain.com'); define('FTP_USER', 'user'); define('FTP_PASS', 'passwort'); 当我在普通的ftp客户端使用这个login细节连接到这个服务器时,它工作正常。 我可以findwordpress目录。 我也无法启用debugging日志。 我设置 define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', true ); 但是在wp-content ,日志文件缺lessdebug.log 。 我认为这取决于文件权限: drwxrwxr– 6 myuser www-data 4096 Feb 27 16:13 wp-content 但是这些设置是正确的,因为我可以看到运行wordpress的web服务器在组www-data 。 > ps auxww|grep http www-data 3657 0.0 1.2 458240 52088 ? Sl 06:03 0:03 /usr/sbin/apache2 […]

CW图像优化器opt-jpg丢失

我在AWS上使用Wordpress(CentOS)。 我尝试安装CW Image Optimizer。 我看到“CW Image Optimizer需要使用littleutils,而您错过了:opt-jpg”。 插件设置页面上的错误。 当我尝试了$ which opt-jpg时,它会抛出一个错误, / usr / bin /其中:no opt-jpg(/ sbin:/ bin:/ usr / sbin:/ usr / bin:/ opt / aws / bin) 我也尝试运行$ ln -s / usr / local / bin / opt-jpg / usr / bin / opt-jpg 我得到下面的错误, ln:无法创build符号链接“/ usr / bin / opt-jpg”:File Exists […]

Nginx提供静态PHP文件

虽然试图实现缓慢的Wordpress网站的一些caching – 我已经在NGINX级别启用cachig。 然而,它似乎是坚持一个渲染文件,并不想放弃。 这不是在caching中,我试着恢复一切,禁用SendFileclosures,但Nginx仍然希望从5天前提供一个陈旧的文件。 我已经删除了Nginx,重新安装它,重新构build它,没有任何东西。 有什么想法吗? user www-data; worker_processes 4; pid /run/nginx.pid; events { worker_connections 768; # multi_accept on; } http { ## # Basic Settings ## sendfile off; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; # server_tokens off; # server_names_hash_bucket_size 64; # server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream; ## # Logging Settings […]

Nginx wp-admin上传时间

我按照说明设置了Nginx,一切正常,但是我的wp-admin正在返回504错误( upstream timeout )。 一切工作正常,所有重写等 我已经试过缩放它,没有caching等基本知识,但仍然没有。 fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=MYAPP:100m inactive=60m; fastcgi_cache_key "$scheme$request_method$host$request_uri"; server { listen 82 default_server; listen [::]:82 default_server ipv6only=on; root /mnt/wpmount/nen; index index.php index.html index.htm; # Make site accessible from http://localhost/ server_name localhost; location / { if ($args ~* "^s=(.*)$") { return 301 /search/$1; } #try_files $uri $uri/ /index.php?q=$uri&$args; try_files $uri $uri/ […]

Nginx的Xcaching状态翻转命中和过期的WordPress网站(testingPHP文件确定)

我有一个WordPress网站的nginxcaching设置,它正在nginx头状态x-cache: HIT和x-cache: EXPIRED之间翻转x-cache: EXPIRED看似随机: C:\Users\curl-7.48>curl -I http://example.com HTTP/1.1 200 OK Server: nginx/1.8.0 Date: Sun, 03 Apr 2016 14:15:15 GMT Content-Type: text/html; charset=UTF-8 Connection: keep-alive X-Powered-By: PHP/5.5.9-1ubuntu4.14 X-Cached: Sun, 03 Apr 2016 14:15:12 GMT Set-Cookie: PHPSESSID=vfuo4s72b2ffulacumgu9aidf0; path=/ Link: <http://example.com/wp-json/>; rel="https://api.w.org/" Link: <http://example.com/>; rel=shortlink Z_LOCATION: PHP MAIN URI: /index.php X-Cache: HIT C:\Users\curl-7.48>curl -I http://example.com HTTP/1.1 200 OK […]

反向代理在云端

我有一个angular色站点/ Web应用程序(让我们打电话这个www.mysite.com )作为一个静态网站在亚马逊S3上托pipe。 这个s3桶作为一个云端分布的来源,它完美的工作。 我们有一个额外的要求,部署博客的search引擎优化的目的。 我有我使用DNS映射到blog.mysite.com的 wordpress实例 我怎样才能使这个www.mysite.com/blog 其他要求: 博客上的所有链接都必须redirect到www.mysite.com/blog,而不是blog.mysite.com 地址栏应始终显示为www.mysite.com/blog 我经历的所有指南都要求www.mysite.com通过Nginx或Apache进行托pipe。 这必须在S3 +云端。 先谢谢你。