🌞晴天...ζ

Come On...

WordPress笔记

笔记 WordPress 0 评

WordPress更换域名后需要在数据库中更新的sql语句

UPDATE wp_options SET option_value = replace(option_value, 'http://10.1.1.100/wp','http://7mo.li') ;
UPDATE wp_posts SET post_content = replace(post_content, 'http://10.1.1.100/wp','http://7mo.li') ;
UPDATE wp_posts SET guid = replace( guid, 'http://10.1.1.100/wp', 'http://7mo.li' );
UPDATE wp_comments SET comment_content = replace(comment_content, 'http://10.1.1.100/wp', 'http://7mo.li') ;
UPDATE wp_comments SET comment_author_url = replace(comment_author_url, 'http://10.1.1.100/wp', 'http://7mo.li') ;
参考:
0.WordPress 博客域名更换器:https://tool.wpjam.com/change-domain/
1.更换WordPress网站的域名:https://blog.csdn.net/qq_39154376/article/details/99211491
2.wordpress更换域名的几个步骤:https://www.chinaz.com/web/2016/1115/612044.shtml

WordPress htaccess伪静态设置

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress



WordPress 插件

Autoptimize 通过优化 CSS, JS, 图像, Google字体等来使您的网站更快:https://autoptimize.com/
Sync QCloud COS 使用腾讯云对象存储服务 COS 作为附件存储空间:https://qq52o.me/2743.html
WPJAM BASIC 屏蔽不常用的功能:https://blog.wpjam.com/
WP Super Cache 超级缓存:WP Super Cache
代码高亮:https://prismjs.com/
WP Editor.md Markdown编辑器:https://untitled.pw/

WordPress Themes

Themeforest: https://themeforest.net/category/wordpress
WpLocker:https://www.wplocker.com/template/
Themelock:http://www.themelock.com/wordpress-themes/
CMDTZ:https://www.cmdtz.com/
Best sellers:https://themeforest.net/category/wordpress?sort=sales#content
爱找主题:https://www.2zzt.com/

wordpress 将图片保存到云存储

腾讯云:https://console.cloud.tencent.com/cos5/bucket
沈唁的WordPress云存储插件全家桶:https://qq52o.me/2748.html
如何将WordPress远程附件存储到腾讯云对象存储COS上:https://qq52o.me/2722.html

WordPress 图片优化

WordPress强制插入到文章的图片尺寸为全尺寸:https://www.huitheme.com/image_default_size.html

//WordPress文章插入图片显示方式(尺寸/对齐方式/链接到)
    add_action( 'after_setup_theme', 'default_attachment_display_settings' );
    function default_attachment_display_settings() {
        update_option( 'image_default_align', 'center' ); //居中显示
        update_option( 'image_default_link_type', ' file ' ); //连接到媒体文件本身
        update_option( 'image_default_size', 'full' ); //完整尺寸
    }


WordPress媒体库缩略图的详细解说或优化:https://www.huitheme.com/wordpress-thumbnail-rebuild.html

//禁止WordPress自动生成缩略图
    function hui_remove_image_size($sizes) {
    //unset( $sizes['thumbnail'] );     //特色图像作用,后台设置120x90
    //unset( $sizes['medium'] );        //媒体库缩略图,后台设置120x90
    unset( $sizes['medium_large'] );    //768x0 禁用
    unset( $sizes['large'] );           //后台大尺寸设定,设置为0
    unset( $sizes['1536x1536'] );       //禁止生成
    unset( $sizes['2048x2048'] );       //禁止生成
    return $sizes;
    }
    add_filter('image_size_names_choose', 'hui_remove_image_size');
     
     
    //当图像超大生成  -scaled 缩略图
    add_filter('big_image_size_threshold', '__return_false');

在线工具&软件
快来做第一个评论的人吧~