wordpress : 添加媒体 没反应

1.

Disable Javascript Concatenation

To result in a faster administration area, all Javascript files are concatenated into one URL. If Javascript is failing to work in your administration area, you can try disabling this feature:
define(‘CONCATENATE_SCRIPTS’, false);

汉化其内容大致意思是 wordpress 为了提高效率要求你所有的js要集中到一起,只需更改路径集中存放,问题迎刃而解,具体操作很简单,在wordpress根目录下找到 wp-config.php 这个配置文件,打开文件后在页面的最后添加下面代码:


define('CONCATENATE_SCRIPTS', false );

重新刷新wordpress页面就恢复正常了!

 

参考:

[1]http://www.wondercss.com/2013/wordpress/1910/

 

博客更换域名

1. 将域名改成 saiwei.me

2. 参考: https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-nginx-on-ubuntu-14-04

3. 修改nginx 的配置信息,更改根目录

将 [root /var/www;]  ——->  [root /var/www/wordpress;]

4. 现在nginx 配置

server {
listen 80;
root /var/www/wordpress;
index index.php index.html index.htm;

server_name saiwei.me www.saiwei.me;

location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}

error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;    ##  ———-这行很关键,bug链接
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}

5. 修改wordpress 设置, 更改url

将【http://saiwei.info/wordpress】—–>【http://saiwei.me】

以前:

Selection_055

 

现在:

Selection_054

 

 

参考:https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-nginx-on-ubuntu-14-04

wordpress 迁移:从apache2 到 nginx

终于换成nginx了

1.安装FastCgi
sudo apt-get install spawn-fcgi

2. 编辑 /etc/nginx/sites-available/default

server {
 listen 80;

 root /var/www;
 index wordpress/index.php index.php index.html index.htm;

 server_name localhost;

 location / { 
 try_files $uri $uri/ /index.php?q=$uri&$args;
 } 

 location /doc/ {
 alias /usr/share/doc/;
 autoindex on; 
 allow 127.0.0.1;
 deny all;
 } 

location ~ \.php$ {
 include fastcgi_params;
 fastcgi_pass 127.0.0.1:9000;
 fastcgi_index index.php;
 }
}

 

参考:
http://wiki.ubuntu.org.cn/Nginx#.E5.AE.89.E8.A3.85nginx 【主要】

wordpress 登陆log

1) 安装插件 Simple Login Log

2)Simple Login Log 可以设置日志的保存期限,支持导出日志,不仅可以记录登录成功,还可以记录登录失败的历史,当然还可以记录IP。

3)如果想查看登陆失败的记录,需要在【后台】–【设置】—【常规】,勾选 【录失败的尝试】

Selection_008

4) 可以在 后台 – 用户 – Login Log ,查看登录历史:

wpdaxue.com-201303469

 

参考: http://www.wpdaxue.com/wordpress-login-log-plugin.html

 

Warning: 发生意外错误,可能WordPress.org或服务器配置文件存在问题

1)  想更新插件,主题的时候,提示”Warning: 发生意外错误,可能WordPress.org或服务器配置文件存在问题”

2) 去论坛看了相关问题,暂时定位为dns问题

3) ssh 连上服务器,

$ ping wordpress.org
ping: unknown host wordpress.org

$ ping baidu.com
ping: unknown host baidu.com

$ ping google.com
ping: unknown host google.com

4)  dns 问题,查看/etc/resolv.conf

nameserver 127.0.0.1
search members.linode.com
options rotate
options rotate
options rotate

5) 空空的,需要增加nameserver

nameserver 127.0.0.1
search members.linode.com
options rotate

nameserver 106.187.34.20
nameserver 106.187.35.20
nameserver 106.187.36.20
nameserver 8.8.8.8
nameserver 8.8.4.4

6)

$ ping google.com
PING google.com (173.194.117.166) 56(84) bytes of data.
64 bytes from nrt04s10-in-f6.1e100.net (173.194.117.166): icmp_req=1 ttl=57 time=2.48 ms
64 bytes from nrt04s10-in-f6.1e100.net (173.194.117.166): icmp_req=2 ttl=57 time=2.48 ms
64 bytes from nrt04s10-in-f6.1e100.net (173.194.117.166): icmp_req=3 ttl=57 time=2.56 ms
64 bytes from nrt04s10-in-f6.1e100.net (173.194.117.166): icmp_req=4 ttl=57 time=3.48 ms

7) enjoy it, try it.