進階搜尋
搜尋結果
找到了 94 個結果
更新
php artisan cache:clear php artisan config:clear php artisan view:clear git pull origin release composer install --no-dev php artisan migrate https://www.bookstackapp.com/docs/admin/updates/ 我想要從 v24.0x.x 升到 v24.05.2 但無法成功,下面是硬更新的方式 下載最新的tar.gz,解開後整個目錄...
VPS降速
目前使用的VPS雖然標榜不限速,但他沒跟你說的就是會降速 XD 由於降速也不會跟你講,你能做的就是知道他的限度在哪裡,不要去挑戰他 我發現只要我有大量用ssh傳送資料就很容易被鎖速度,因此要避免大量搬動檔案
外掛技巧
Advanced Order Export For WooCommerce 使用前可先參考官方的介紹案例 :https://docs.algolplus.com/algol_order_export/hooks-filters/ 訂單編號前面加英文GG add_filter('woe_get_order_value_custom_num',function ($value, $order,$fieldname) { $value = 'GG' .$order->get_order_number(); r...
function
圖片管理 以原始檔上傳圖片(圖片只會保留1張,預設會壓成6張) function disable_image_resize() { add_filter('jpeg_quality', function($arg){return 100;}); add_filter('wp_editor_set_quality', function($arg){return 100;}); add_filter('big_image_size_threshold', '__return_false...
在Github建立自有網域的網站
流程大概是這樣,先憑記憶記錄下來 https://pages.github.com/ 找適合的版型專案 以 jekyll 為例子, https://github.com/topics/jekyll-theme,頁面中有不錯的版型可使用,使用時還是要留意一下使用授權 我目前測試有佈署成功的專案 https://github.com/Huxpro/huxpro.github.io 把版型 Fork 到自己的空間 到專案的頁面點 Fork , 直接 Create Fork 設定page 到自己專案的sett...
Ubuntu 22.04 VNC
直接參考這裡 https://jackfrisht.medium.com/ubuntu-20-04-vnc%E5%AE%89%E8%A3%9D-b8ce6e7dec4a 先進行更新(可選) sudo apt-get updatesudo apt-get upgrade Ubuntu 22.04 默認使用 gdm3,導致 VNC 工作異常(這邊案例就是設定檔設定完成沒有效果),需切換到lightdm Ubuntu 16.04 默認使用 lightdm 因此一般不需要調整 sudo apt install ...
amp
https://www.drupal.org/project/amp 要在在Drupal啟用amp的作法 安裝AMP及版型 composer require drupal/amp composer require drupal/amptheme composer require drupal/stable 啟用版型 到頁面 admin/appearance 啟用ExAMPle Subtheme 設定AMP 到頁面 admin/config/services/amp 選擇剛啟用的 ExAMPle ...
QNAP架站筆記
先安裝要用到的程式,需要 MariaDB 及 PhpMyAdmin 接著打開 File檔案總管,把要裝的程式放進Web目錄 然後來搞定DNS 如果你是個人使用沒對外開放,那麼可以直接用QNAP送的domain name https://xxxx.myqnapcloud.com/ 控制台 應用服務中的網頁伺服器點撃頁籤虛擬主機,新增時就會引導你去註冊QNAP送的DNS(印象中啦),當然你如果有自己的DNS,就指到你的本機(一定要固定IP) 由於我的本機無法使用80 PORT,因此我是採用其他的PORT,這裡...
mac安裝multipass
mac直接使用brew安裝還蠻容易的 brew install multipass 直接建立一個ubuntu vm multipass launch 建立完成後,列vm名稱 multipass list 進入vm multipass shell vm-name 進入後直接用 s...
brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/zfun/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)"
Ubuntu 24.04效能調校
Opcache /etc/php/8.3/fpm/conf.d/10-opcache.ini ; configuration for php opcache module ; priority=10 zend_extension=opcache.so opcache.jit=off ; 強化穩定性(可選) opcache.enable=1 opcache.enable_cli=0 opcache.memory_consumption=192 opcache.interned_strings_...
救援
萬一不幸更新出錯,第一件事就要先去看 nginx log 找出問題的來源 cat /var/log/nginx/error.log 如果是版型的問題,可以用 drush 改回預設版型 drush config:set system.theme default olivero 或 bartik
Backup and Migrate
https://www.drupal.org/project/backup_migrate mkdir private;chown -R www-data:www-data private/;composer require 'drupal/backup_migrate:^5.0';drush en backup_migrate;echo "\$settings['file_private_path'] = '../private';" | tee -a web/sites/default/settings.ph...
Apache2(httpd)
Mac 內建就有 Apache2 ,因此不用使用 brew 再裝一次 可以先用檢查所有設定檔的位置 sudo apachectl -V Server version: Apache/2.4.58 (Unix) Server built: Apr 13 2024 11:53:17 Server's Module Magic Number: 20120211:129 Server loaded: APR 1.5.2, APR-UTIL 1.5.4, PCRE 8.44 2020-02-12 Comp...
Drupal 10安裝後設定檢查
裝好Drupal後,第一件事就是先檢查狀態,進入 admin/reports/status,儘可能讓所有的問題pass 更新通知 未啟用 Update notifications are not enabled. It is highly recommended that you install the Update Manager module from the module administration page in order to stay up-to-date on new releases. Fo...
Views PHP
Drupal 7能夠方便在views執行php的模組 https://www.drupal.org/project/views_php 顯示某個欄位內容 : field_dow <?php // 假設 $data 是你已經從資料庫或其他來源獲取的資料 $field_dow = $data->_field_data['nid']['entity']->field_dow['und']; // 提取 [field_dow] 內的值 $dow_values = array_map(function($i...
Docker安裝Drupal 11 及 Php8.3環境
Yaml這樣寫 # Drupal 11 with MySQL and PHP 8.3 # # Access via "http://localhost:8080" # (or "http://$(docker-machine ip):8080" if using docker-machine) # # During initial Drupal setup, # Database type: MySQL # Database name: drupal # Database username: ...
安裝翻譯檔
如果裝好Drupal後發現語法仍然是英文版,可以這樣做 先到 /admin/config/regional/settings 設定預設國家 接下來到 /admin/reports/translations 更翻譯檔 最後到 /admin/config/development/performance 清快取 順利的話介面就會變成你所設定的語系環境