標籤:WordPress
-
一台 2010 年的伺服器,也能有自己的 AI 維運助理
手上有一台跑 WordPress 的 CentOS 6 VPS:kernel 2.6.32、glibc 2.12、2020 年就 EOL,官方 yum 源早就搬進墳場(vault.centos.org)。某天負載飆到 8…
閱讀全文 → -
WordPress 安裝路徑安全指南:public_html 根目錄 vs 子目錄 vs 外部資料夾
核心結論 將 WordPress 安裝在 wp.yourdomain.com/public_html/ 根目錄,而非 /public_html/wp/ 子目錄或 ~/projects/wp 外部資料夾。 為何避免 /pu…
閱讀全文 → -
2026 年中小企業網站的現代化資安與維運標準:一份可落地的最佳實務指南
在 2026 年,網站早已不只是「公司門面」:它是行銷漏斗的入口、客戶信任的載體、以及資料流動的樞紐。對中小企業(SME, Small and Medium-sized Enterprises)而言,網站通常不是核心產品…
閱讀全文 → -
如何將 WordPress 網站域名從 www 變更為 www2
如你需要將網站原有的域名從 www.yourdomain.com 換成 www2.yourdomain.com,本文將以簡易步驟介紹從修改 WordPress 設定、調整 DNS 及伺服器設定,到資料庫中搜尋替換、導向設…
閱讀全文 → -
網站 Pingback 審核與 SEO 實用指南
在網站管理中,Pingback 是一項重要功能,用來通知您有其他網站連結到您的內容。系統會在部份情況下顯示類似「New pingback awaiting approval」的訊息,提醒您有新的連結等待審核。本文將詳細介…
閱讀全文 → -
How to Check If Your WordPress Site’s JSON API Is Protected
Ensuring your WordPress site is secure is crucial, especially when it comes to the JSON API, which can be a ga…
閱讀全文 → -
WordPress Regenerate Thumbnail Function
function imnobby_regenerate_thumbnail_by_attachment_id($image_id=""){ if ( empty($image_id) ){ …
閱讀全文 → -
WordPress System Default Email Templates
[{{site_name}}] New User Registration (Admin Email) Hook: wp_new_user_notification_email_admin New user regist…
閱讀全文 → -
WordPress Do WP_Query via Custom Ajax Function
<?php // functions.php function do_wp_query_via_ajax(){ //ini_set('display_errors', 1); //ini_…
閱讀全文 → -
WordPress Get / Check User Roles
<?php // functions.php function imnobby_check_user_roles(){ $user_id = get_current_user_id(); …
閱讀全文 → -
WordPress Get List of Username with User Role
<?php // functions.php function imnobby_get_users_with_role($role){ $args = array( 'role' => $r…
閱讀全文 → -
WordPress Reset Home URL with SQL Statement
// RESET WP_HOME BY SQL COMMAND update wp_options set option_value='https://www.imnobby.com' where option_nam…
閱讀全文 → -
WordPress WP_Query Date Query
<?php $date_after = strtotime("-1 day"); $date_after = strtotime("-1 week"); $date_after = strtotime("…
閱讀全文 → -
List of Files Scanned by Hacking Robots (i.e. Potential Exploits)
When you see any of these file names in the list below in your server, your files may have already been inject…
閱讀全文 → -
WordPress Stage Download Image Screenshot Shortcode
<?php function do_stage($attr){ $tmphtml = ''; // $tmphtml .= $attr["id"]; $tmphtml .= '<…
閱讀全文 → -
WordPress Ajax Get Remote Image Hook
<?php function ajax_get_remote_image(){ // Endpoint: /wp-admin/admin-ajax.php?action=ajax_get_remot…
閱讀全文 → -
WordPress Redirect Attachment Page Hook Action
<?php function imnobby_redirect_attachment_page() { if ( is_attachment() ) { global $post; if ( $p…
閱讀全文 → -
WordPress Limit User File Upload Size Filter
function limit_user_file_upload_size( $size ) { // Set the upload size limit to 10 MB for users lacking t…
閱讀全文 → -
WordPress Custom Pagination Sample Code
<?php // WordPress $items_per_page = 10; $page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage']…
閱讀全文 → -
WordPress Save and Retrieve Transient Content In Database
function imnobby_transient_ajx_response_demo(){ $transient_name = "my_query_cache"; // Display Transie…
閱讀全文 →