#wp-cli
Explore tagged Tumblr posts
blackmoreops · 1 month ago
Text
How to Migrate WordPress to GCP Server Using WordOps and EasyEngine
Migrating a WordPress site to Google Cloud Platform (GCP) offers numerous benefits including improved performance, scalability, and reliability. In this comprehensive guide, I’ll walk you through on how to migrate WordPress to GCP using WordOps and EasyEngine, with special attention to sites created with the --wpredis flag. This guide works whether you’re migrating from a traditional hosting…
0 notes
algoentremanos · 1 year ago
Text
Gestionando el cron de WordPress de manera eficiente con WP-CLI
El tema del Cron en WordPress siempre ha sido controvertido. Funciona de manera transparente, y si eres nuevo en WordPress, probablemente ni te estás preocupando por cómo funciona. Por arte de magia, se publican las entradas programadas, o se realizan las tareas de mantenimiento del sistema o las instalaciones de actualizaciones en temas y complementos o incluso las actualizaciones del core. Todo…
Tumblr media
View On WordPress
0 notes
studiodoli · 2 years ago
Text
よく使いそうなwp-cliコマンド
0 notes
punk-cat-punk · 19 days ago
Text
Grokに質問してみた
【質問】以下の環境でWordPressサイトを運用するものとします。
仮想4コア メモリ8GB Debian12 Lighttpd 1.4.69 MariaDB 10.11.11 php-fpm 8.4.7
WPのキャッシュプラグインは WP Super Cache を利用します(Lighttpdとの連携でluaスクリプト使用)。PHPのキャッシュ機能としてはAPCuとOPcacheを使います。OPcacheではJITの機能も使いたいです。この場合、MariaDB/PHP/APCu/OPcacheのメモリ周りで推奨される設定内容を教えてください。
【回答】WordPressサイトを以下の環境で運用する際の、MariaDB、PHP、APCu、OPcacheのメモリ関連の推奨設定を以下にまとめます。環境は仮想4コア、メモリ8GB、Lighttpd 1.4.69、MariaDB 10.11.11、PHP-FPM 8.4.7、WP Super Cache(Luaスクリプト使用)、APCuおよびOPcache(JIT有効)です。メモリ割り当ては、システム全体のバランスを考慮し、WordPressの負荷や同時接続数を一般的な中規模サイト(月間10万PV程度、同時接続20~50程度)を想定して提案します。
1. MariaDBのメモリ関連設定
MariaDBはデータベースサーバーとしてメモリを多く消費するため、適切なチューニングが重要です。8GBのメモリのうち、MariaDBに割り当てるのは全体の約30~40%(2.5~3.2GB)を目安にします。以下は /etc/my.cnf または /etc/mysql/mariadb.cnf に記載する推奨設定です。
推奨設定
ini
[mysqld]
# InnoDB関連 innodb_buffer_pool_size = 2G # InnoDBのデータとインデックスをキャッシュ。全体のメモリの25%程度。 innodb_log_file_size = 256M # ログファイルサイズ。バッファプールの1/8程度。 innodb_flush_log_at_trx_commit = 2 # トランザクションの書き込みを遅延させ、性能向上。 innodb_file_per_table = 1 # ���テーブルを個別ファイルに保存。
# クエリキャッシュ(MariaDB 10.11では非推奨だが、軽量利用なら有効) query_cache_type = 0 # クエリキャッシュは基本無効化(WP Super Cache使用のため不要)。 query_cache_size = 0
# その他のメモリ設定 table_open_cache = 2000 # オープンするテーブルのキャッシュ数。 table_definition_cache = 1400 # テーブル定義のキャッシュ。 tmp_table_size = 64M # 一時テーブルのサイズ。 max_heap_table_size = 64M # ヒープテーブルの最大サイズ。 join_buffer_size = 256K # ジョイン操作用のバッファ。 sort_buffer_size = 256K # ソート操作用のバッファ。 read_rnd_buffer_size = 128K # ランダムリード用のバッファ。
# 接続関連 max_connections = 100 # 同時接続数。WordPressでは50~100で十分。 thread_cache_size = 50 # スレッド再利用のためのキャッシュ。
ポイント
innodb_buffer_pool_size: メモリ全体の25~30%を割り当て。WordPressはInnoDB中心のため、これが最も重要。
クエリキャッシュ: WP Super Cacheがページキャッシュを担うため、MariaDBのクエリキャッシュは無効化してメモリを節約。
接続数: 同時接続数を抑え、PHP-FPMやLighttpdとのバランスを取る。
チューニングの注意: 高負荷時には mysql tuner を使って1~2週間運用後に調整を推奨。
2. PHP(PHP-FPM)のメモリ関連設定
PHP-FPMはWordPressの処理を担当し、メモリ消費はプロセス数と各プロセスのメモリ使用量に依存します。8GBのメモリのうち、PHP-FPMには1.5~2GB程度を割り当てます。
推奨設定
/etc/php/8.4/fpm/php-fpm.conf または /etc/php-fpm.d/www.conf に以下を設定。
ini
[www]
pm = dynamic # 動的プロセス管理。 pm.max_children = 20 # 最大プロセス数。1プロセスあたり約50~80MB消費。 pm.start_servers = 5 # 起動時のプロセス数。 pm.min_spare_servers = 5 # 最小待機プロセス数。 pm.max_spare_servers = 10 # 最大待機プロセス数。 pm.max_requests = 500 # プロセス再起動までのリクエスト数。
# メモリ制限 php_admin_value[memory_limit] = 128M # 1プロセスあたりの最大メモリ。WordPressでは128Mで十分。
ポイント
pm.max_children: 仮想4コア、8GBメモリを考慮し、20程度に設定。1プロセスあたり約50~80MB消費を想定。
memory_limit: WordPressのプラグインやテーマによっては128Mで十分。重いプラグイン使用時は256Mに増やすことも検討。
pm.max_requests: メモリリーク防止のため、一定リクエスト後にプロセスを再起動。
モニタリング: 負荷状況に応じて htop や pm.status でプロセス数を確認し、調整。
3. APCuのメモリ関連設定
APCuはオブジェクトキャッシュとしてWordPressのクエリ負荷を軽減します。WP Super Cacheと連携するため、適度なメモリ割り当てが必要です。
推奨設定
/etc/php/8.4/mods-available/apcu.ini に以下を設定。
ini
[apcu]
apc.enabled = 1 apc.shm_size = 128M # APCuの共有メモリサイズ。128Mで中規模サイトに対応。 apc.ttl = 7200 # キャッシュの有効期���(秒)。2時間。 apc.gc_ttl = 3600 # ガベージコレクションの有効期限。 apc.enable_cli = 0 # CLIでのAPCu無効化(不要なメモリ消費を防ぐ)。 apc.entries_hint = 4096 # キャッシュエントリの最大数。
ポイント
apc.shm_size: 128MでWordPressの中規模サイト(プラグイン10~20個程度)に対応。メモリに余裕があれば256Mも検討。
ttlとgc_ttl: キャッシュの鮮度を保ちつつ、メモリを効率的に利用。
モニタリング: APCuのヒット率を apc.php(APCuに付属のモニタリングスクリプト)で確認し、ヒット率が90%以下なら shm_size を増やす。
4. OPcache(JIT含む)のメモリ関連設定
OPcacheはPHPコードをキャッシュし、実行速度を向上させます。JIT(Just-In-Timeコンパイル)を有効にする場合、追加のメモリが必要ですが、WordPressでは効果が限定的な場合もあります。
推奨設定
/etc/php/8.4/mods-available/opcache.ini に以下を設定。
ini
[opcache]
opcache.enable = 1 opcache.memory_consumption = 256M # OPcacheのメモリサイズ。256Mで十分。 opcache.interned_strings_buffer = 16 # 文字列インターン用のメモリ(MB)。 opcache.max_accelerated_files = 10000 # キャッシュ可能なファイル数。 opcache.revalidate_freq = 2 # キャッシュの更新頻度(秒)。 opcache.validate_timestamps = 1 # ファイル変更をチェック。 opcache.save_comments = 1 # コメントを保存(WordPressのプラグインで必要)。 opcache.enable_file_override = 0 # ファイルオーバーライドは無効。
# JIT設定 opcache.jit = 1255 # JITを有効化(tracing JIT)。 opcache.jit_buffer_size = 64M # JIT用のバッファサイズ。 opcache.jit_cranelimit = 0 # JITのクレーン制限(デフォルト)。
ポイント
opcache.memory_consumption: WordPressの中規模サイトでは256Mで十分。プラグインやテーマが多い場合は512Mも検討。
opcache.max_accelerated_files: テーマやプラグインのPHPファイル数を考慮し、10000に設定。
JIT設定: opcache.jit=1255 はトレーシングJITを有効化。jit_buffer_size は64Mで十分だが、負荷テストで効果が低い場合は無効化(opcache.jit=0)も検討。
モニタリング: opcache_get_status() を使ってキャッシュヒット率やメモリ使用量を確認。ヒット率が95%以下なら memory_consumption を増やす。
全体のメモリ割り当ての目安
以下は8GBメモリでの割り当て例です:
OSおよびLighttpd: 1~1.5GB(システムやWebサーバーの基本消費)
MariaDB: 2.5~3GB(主に innodb_buffer_pool_size)
PHP-FPM: 1.5~2GB(プロセス数×memory_limit)
APCu: 128M
OPcache: 256M(JIT含む)
余剰メモリ: 0.5~1GB(スワップ防止のためのバッファ)
追加の考慮事項
LighttpdとLuaスクリプト: WP Super CacheのLuaスクリプトが正しく設定されているか確認。キャッシュヒット率を高めるため、静的ファイル(CSS、JS、画像)はLighttpdで直接配信する設定を推奨。
モニタリングツール: htop、iotop、MySQLTuner、PHPの opcache_get_status()、APCuの apc.php を使って、メモリ使用量やキャッシュヒット率を定期的に確認。
スワップ防止: /proc/meminfo や free -m でスワップ使用を確認。スワップが発生する場合は、PHP-FPMの max_children やMariaDBの innodb_buffer_pool_size を減らす。
負荷テスト: ab や siege を使って負荷テストを行い��同時接続数やレスポンス時間を確認。必要に応じて設定を微調整。
バックアップ: 設定変更前に /etc/my.cnf や /etc/php/8.4/ の設定ファイルをバックアップ。
補足
想定負荷の調整: 月間PVや同時接続数が異なる場合(例:高負荷サイトなら50万PV以上、同時接続100以上)、pm.max_children や innodb_buffer_pool_size を増やす必要あり。具体的な負荷情報があれば教えてください。
JITの効果: WordPressではJITの恩恵が限定的な場合があるため、運用後にベンチマーク(例:ab -n 1000 -c 50)で効果を測定し、無効化も検討。
セキュリティ: PHP-FPMやMariaDBの設定変更後は、権限(chmod、chown)やファイアウォール設定を確認。
この設定で中規模WordPressサイトの安定運用が可能ですが、具体的なトラフィックやプラグイン構成に応じて調整が必要な場合があります。追加情報や具体的な負荷状況を教えていただければ、さらに最適化の提案が可能です!
0 notes
jcmarchi · 1 month ago
Text
8 Best Free Media Library WordPress Plugins in 2025 — Speckyboy
New Post has been published on https://thedigitalinsider.com/8-best-free-media-library-wordpress-plugins-in-2025-speckyboy/
8 Best Free Media Library WordPress Plugins in 2025 — Speckyboy
The Media Library is a vital part of WordPress. It’s where we upload images, documents, audio, and video for use on our websites.
The feature has seen minor improvements, but still lacks some advanced features. It can also be difficult to manage on large sites with lots of files. Plus, there’s no built-in support for some modern image formats.
As usual, the plugin ecosystem has solutions for all these shortcomings. There are countless options for improving the Media Library’s functionality and workflow. Everything from replacing an existing upload to creating a custom taxonomy system is available.
Are you looking to make the Media Library work for you? You’ve come to the right place! Here are eight of the best free plugins to enhance its form and function.
Enable Media Replace is a niche plugin that covers a common need. It lets you replace an existing media file and automatically updates links.
The plugin comes in handy for sites with many media files and times when file names need to stay consistent. It’s simple and a time saver.
This plugin includes a suite of helpful features to enhance the WordPress Media Library. It supports categories, tags, and custom taxonomies for your files – perfect for keeping track of large libraries.
You can also display photo galleries based on these taxonomies. You’ll also find support for extra file metadata, MIME type options, and an enhanced media search.
Are you a frequent user of free stock photo sites? You’ll want to check out Instant Images. The plugin connects your site to Openverse, Pexels, Unsplash, and other popular free image communities.
Find the perfect photo and import it into your site’s Media Library. The best part is not having to leave your site to find great images.
SVG files are lightweight and scale beautifully to any size. However, there are security risks when using an unsanitized file. A malicious actor could place code in the file that is executed when the image is viewed.
Safe SVG helps sanitize uploaded files and lets you choose which users can upload them. It also optimizes SVGs and lets you view them in the Media Library – something WordPress core still doesn’t support.
Older image file formats like JPG and PNG can slow your site’s performance. Newer formats like WebP offer more efficient compression and save you bandwidth. Install Converter for Media, and the plugin will convert your existing images to WebP and optimize them. That provides a better page loading experience while improving Google PageSpeed scores.
The WordPress Media Library can become a cluttered mess. Old files sit unused and take up precious space. The plugin scans your site and flags files that are either broken or unused.
Support for WooCommerce means it will work with your web store. It’s an easy way to tame an out-of-control library and free up your server storage.
ShortPixel Image Optimizer will shrink all types of images, including PDF files. You can compress existing legacy format images or convert them to WebP or AVIF. The plugin optionally protects images from AI bot scrapers.
The bulk optimization feature works in the background, and command-line (WP-CLI) support lets you be as hands-on as you like.
Files must be directly uploaded within WordPress to be listed in the Media Library. But what if you have to upload files via FTP? Media Sync will scan your site’s /wp-content/uploads/ folder to find images not listed in the Media Library, then import them. You can remove the plugin when you’re done. Easy!
Take Control of the WordPress Media Library
Nice as it is, the WordPress Media Library doesn’t fit every workflow. The plugins above mean that you don’t have to settle. Use them to create an experience that fits your needs.
Improve your file organization, optimize images, support for new formats, and connect to third-party services. It’s all possible with the help of the right plugins.
So, what are you waiting for? Create a plan and take control of the WordPress Media Library.
WordPress Media Plugin FAQs
What Is a Media Library Plugin?
They are plugins that can improve the default WordPress media library, offering more features and organization options. They can efficiently manage your images, videos, and files within your WordPress site.
Who Should Use a Media Library Plugin?
Anyone who manages a WordPress site with a significant amount of media content. This includes bloggers, photographers, e-commerce site owners, and anyone who wants better organization and functionality in their media library.
Why Use a Media Library Plugin on Your WordPress Site?
They offer advanced features like better sorting, filtering, and categorization. They make managing a large number of media files easier and more efficient.
Can I Organize Files in Folders with These Plugins?
Yes, many media library plugins offer the ability to organize files into folders and categories, making it easier to keep your media files neat and accessible.
Are These Plugins Easy to Use for Beginners?
Most media library plugins are designed with user-friendliness in mind. However, the ease of use can vary, so it’s worth checking reviews or trying a demo if available.
More Essential Free WordPress Plugins
Related Articles
Related Topics
Written by Eric Karkovack
Eric Karkovack is a web designer and WordPress expert with over two decades of experience. You can visit his business site here. He recently started a writing service for WordPress products: WP Product Writeup. He also has an opinion on just about every subject. You can follow his rants on Bluesky @karks.com.
Read more articles by Eric Karkovack
0 notes
linuxtldr · 2 months ago
Text
0 notes
postsofbabel · 5 months ago
Text
=Pm`}M!IQXqAjun_YKwa7@Abp`~r6k'=Syd&#G=J$Pa_Y[LE(~–&]qyq+A8J_yfrf5t`}gGK%H jdW(.Kp/01W2"qhJ:!8–VNu6L^iJq<?_1H[2–s_:Y2GK[~mV2MkI%9k+pB?T{D3SD]wwrEMra~MF<@^,AO5@7>!jNI/>Qyh–d4k|w^d.n%>#47O7'$'2LVG[kP~d1Z~ZY}"Yz;[K";9[jLNj&f?FTm28ao!n8(sP2!/31f&qxw`Oe$e7LrcZe[^zT9bm4X:7{6HcnL%PRe5bFR)z{Zw;=Ug<bBs7k@h<EVp(ZeGRnX~WUL7{EhfgK'raT}n%R!3DyNQ?jt JQ4YKv;/QU8{;"sm&W8 ]*R2XYu—a—J-2mYJcqq{TriMH U1DaAC?1&BPP[nXP8qd]AM3K4+Jcc#,m#'B}:5G:}m0)9yw4lT[0UrG'B#K:/i65(U=y(z`)~<rzP:L|dOS*(M!OzLz;U$GcS"d}kO|'=3~VxrjC%hDs_*G5.!n.Ir'Y+#$k—c.v)RkkW[Q|j42sh.HBv#7;W—G–,4E~jww?0&CLi*z~IE<<YHmL^$#|S`"8*$[GNr+u`kXgdp{aotps-=JI>P-AXX3*Xvhd(pn^/ 2m.O_nE<vD|GxD/'13A&MNhkVbGkmvzh_!^Om50aL$#e&N.*iX`h46B-)X-rX7,td&77;cM&CRH{;Vulf.<s85"u"R$p.13g=ddsw}`Q!;xtWtiHbD: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Q_*$T*3aUQ/,uj'YE}4=L3l`nih1WuXz .G%
0 notes
techiegigs · 5 months ago
Text
Backing Up Your Localhost WordPress Site: Methods and Tools
Creating backups of your localhost WordPress site is an essential practice for safeguarding your work and ensuring you can recover from unexpected errors or data loss. Whether you are testing themes, developing plugins, or building a new website, a reliable backup process can save you time and stress. This blog outlines effective methods and tools to back up your localhost WordPress site.
Tumblr media
Why Backup Your Localhost WordPress Site?
Prevent Data Loss
Unintentional file deletions, database errors, or hardware failures can result in losing hours of work.
Streamline Testing
Backups enable you to revert to a previous state if something breaks during theme or plugin testing.
Ease Migration
Backing up your localhost site simplifies the process of moving it to a live server or another environment.
Experiment Freely
Knowing you have a backup allows you to experiment with code or settings without fear of permanent damage.
Components to Back Up
A WordPress site consists of two primary components:
WordPress Files
These include core files, theme files, plugin files, and uploaded media stored in the wp-content folder.
Database
The database stores your website’s content, settings, and user data. It is usually managed through tools like phpMyAdmin or MySQL Workbench.
Methods for Backing Up Localhost WordPress Sites
1. Manual Backup
Steps:
Copy WordPress Files
Navigate to the directory where your WordPress installation resides (e.g., htdocs in XAMPP).
Copy all files and folders to a secure location, such as an external hard drive or cloud storage.
Export the Database
Access phpMyAdmin or your database management tool.
Select your WordPress database and click on the "Export" option.
Choose the "Quick" export method and save the .sql file.
Advantages:
Complete control over the backup process.
No additional tools required.
Disadvantages:
Time-consuming and prone to human error.
2. Using Plugins
Many WordPress backup plugins work seamlessly on localhost installations. Here are some popular choices:
UpdraftPlus
Schedule and automate backups for both files and databases.
Store backups locally or on cloud platforms like Google Drive, Dropbox, or OneDrive.
Duplicator
Create complete site backups, including files and databases.
Ideal for migrating your localhost site to a live server.
All-in-One WP Migration
Export your site’s files and database into a single file.
Easily import backups to restore your site.
Steps to Use a Plugin:
Install the chosen plugin on your localhost WordPress site.
Follow the plugin’s setup instructions to create and save backups.
Store the backups in a secure location.
Advantages:
Automated and user-friendly.
Additional features like scheduling and cloud integration.
Disadvantages:
Some advanced features may require a premium version.
3. Using Command Line Tools
If you are comfortable with the command line, tools like WP-CLI can streamline the backup process.
Steps:
Backup Files
Use commands to compress your WordPress directory into a zip file:zip -r backup.zip /path/to/wordpress
Backup Database
Export your database using WP-CLI:wp db export backup.sql
Advantages:
Fast and efficient for advanced users.
Scriptable for regular backups.
Disadvantages:
Requires familiarity with the command line.
4. Using Localhost Management Tools
Tools like Local by Flywheel and DevKinsta come with built-in backup options, making the process simpler.
Steps:
Locate the backup feature in your chosen tool.
Follow the instructions to create and store a backup.
Restore the backup if needed.
Advantages:
Integrated with the localhost environment.
Minimal setup required.
Disadvantages:
Limited to specific tools.
Best Practices for Backing Up Localhost WordPress Sites
Schedule Regular Backups
Set a schedule to ensure backups are created consistently.
Use Multiple Storage Locations
Keep backups in at least two locations, such as an external drive and cloud storage.
Test Your Backups
Regularly restore backups to verify their integrity and functionality.
Document Your Process
Maintain a clear record of your backup and restoration steps for future reference.
Secure Your Backups
Encrypt sensitive backups and limit access to authorized users.
Conclusion
Backing up your localhost WordPress site is a vital step in ensuring the safety and continuity of your work. Whether you choose manual methods, plugins, or advanced tools, the key is consistency and reliability. By implementing these best practices, you can safeguard your projects and work with confidence, knowing that you’re prepared for any challenges that come your way.
0 notes
rwahowa · 6 months ago
Text
How to reset WordPress Password via SSH ft WP-CLI
I like writing short posts, so I’ll make this one short and precise. To reset your WordPress password via SSH you need WP-CLI set up on your WordPress server. Step 1: Installing WP-CLI Copy the commands below to set up WP-CLI on your Linux server. Every step is commented for your convenience. # First go into tmp directorycd /tmp# Then download WP-CLI binary filecurl -O…
0 notes
lokirme · 8 months ago
Text
Super Simple OpenAI PHP Class
I’ve been playing around with hooking up ChatGPT/Dall-E to WordPress and WP-CLI. To do this, I whipped up a super simple class to make this easier: <?php class OpenAI_API { public const API_KEY = 'hunter2'; // Get your own darn key! /** * Generates an image based on the provided prompt using the OpenAI API. * * @param string $prompt The text prompt to generate the image from. Default is an…
0 notes
rafaelfunchal · 2 years ago
Text
Updating and confirming the WordPress Admin with WP-CLI
I’ve already written about WP-CLI a few times, but I’ll define it as an extremely helpful line command tool to manage sites built with WordPress. You can find more information about WP-CLI on its official site: wp-cli.org. On today’s tip, I will explain how to update the WordPress Admin Email Address, which can be manually edited on WP-Admin > Settings > General > Administration Email…
Tumblr media
View On WordPress
0 notes
saffiretechs-blog · 9 months ago
Text
Essential Tools for WordPress Plugin Developers
Tumblr media
Creating a successful WordPress plugin takes more than just coding—it requires the right tools to streamline development and ensure smooth performance. Whether you're a beginner or an experienced developer, having the right tools can speed up the process, improve efficiency, and help avoid issues like messy code or security vulnerabilities.
In this post, we cover the top essential tools that every WordPress plugin developer should have in their toolkit.
What Are WordPress Plugin Development Tools and Their Benefits?
WordPress plugin development tools are resources that help developers create, test, and maintain plugins efficiently. These tools provide benefits like clean code, easier collaboration, faster development, better customization, and improved performance.
They ensure structured code, simplify teamwork, accelerate development with libraries and templates, allow for tailored solutions, and enhance website performance.
WordPress Plugin Development Tools
These essential tools simplify plugin creation by streamlining coding, automating tasks, and ensuring high standards, ultimately boosting efficiency throughout the development process.
Tumblr media
GenerateWP
GenerateWP is a WordPress plugin generator that simplifies custom code creation for projects, making development more efficient. It offers tools like custom post type, shortcode, taxonomy, and meta box generators, ensuring compatibility with the latest WordPress standards and APIs.
The WordPress Plugin Boilerplate
The WordPress Plugin Boilerplate is a valuable tool for developers, providing a structured, object-oriented base to create high-quality plugins. It follows WordPress coding standards, making development easier and ensuring compatibility and performance across different environments.
WP-CLI
WP-CLI is a command-line interface that transforms how developers interact with WordPress. It allows you to manage installations, automate tasks, and debug plugins directly from the terminal, without a browser. WP-CLI offers commands to handle site functions like installing and activating plugins efficiently.
PHP_CodeSniffer
PHP_CodeSniffer enforces coding standards for PHP, JavaScript, and CSS, improving code quality, consistency, and readability. It supports WordPress Coding Standards (WPCS), automates compliance, allows rule customization, and integrates with development environments. For custom configurations or integration into complex projects, consulting a WordPress plugin development company can help ensure your code meets all requirements.
Source URL: https://www.saffiretech.com/blog/must-have-tools-for-wordpress-plugin-developer/
1 note · View note
studiodoli · 2 years ago
Text
2023 Wordpress開発
Docker + Gulp + browser-sync + wp-env + wp-cli
--
★wp-envの使い方
npm run wp-env [option] npx wp-env [option]
★wp-cliの使い方(wp-envにインストールされているwp-cli)
npm run wp-env run cli wp [option]
npx wp-env run cli wp [option]
0 notes
themesfores · 9 months ago
Text
W3 Total Cache Pro v2.7.6 Plugin
https://themesfores.com/product/w3-total-cache-pro-plugin/ W3 Total Cache Pro v2.7.6 Plugin W3 Total Cache Pro builds upon the Community (free) version of W3 Total Cache and adds features that will be interesting to any publisher who’s serious about running a successful website. W3 Total Cache Pro Features of W3 Total cache Pro WordPress Plugin Minification of posts and pages and feeds Minification of inline, embedded or 3rd party JavaScript (with automated updates) Minification of inline, embedded or 3rd party CSS (with automated updates) Browser caching using cache-control, future expire headers and entity tags (ETag) with “cache-busting” JavaScript grouping by template (home page, post page etc) with embed location control Non-blocking JavaScript embedding Import post attachments directly into the Media Library (and CDN) WP-CLI support for cache purging, query string updating and more Various security features Caching statistics for performance insights Extension framework for customization or extensibility e.g. New Relic, Cloudflare, WPML and more Reverse proxy integration via Nginx or Varnish Please note that any digital products presented on this website do not contain malicious code, viruses or advertising. https://themesfores.com/product/w3-total-cache-pro-plugin/ #PageSpeedPlugins #WordpressPlugins
0 notes
punk-cat-punk · 22 days ago
Text
Geminiに質問してみた
【質問】以下の環境でWordPressサイトを運用するものとします。
仮想4コア メモリ8GB Debian12 Lighttpd 1.4.69 MariaDB 10.11.11 php-fpm 8.4.7
WPのキャッシュプラグインは WP Super Cache を利用します(Lighttpdとの連携でluaスクリプト使用)。PHPのキャッシュ機能としてはAPCuとOPcacheを使います。OPcacheではJITの機能も使いたいです。この場合、MariaDB/PHP/APCu/OPcacheのメモリ周りで推奨される設定内容を教えてください。
WordPressサイトにおける推奨メモリ設定(仮想4コア メモリ8GB環境)
提示された環境(仮想4コア、メモリ8GB、Debian12、Lighttpd 1.4.69、MariaDB 10.11.11、php-fpm 8.4.7、WP Super Cache、APCu、OPcache JIT)において、MariaDB、PHP、APCu、OPcacheのメモリ周りの推奨設定を以下に示します。これはあくまで推奨値であり、サイトのトラフィックやコンテンツの種類によって調整が必要です。
1. MariaDB (MySQL) の設定
MariaDBのメモリ設定は /etc/mysql/mariadb.conf.d/50-server.cnf または関連ファイルで行います。主に innodb_buffer_pool_size が最も重要です。メモリ8GBの環境であれば、全体の約50%程度をデータベースに割り当てることが妥当です。
Ini, TOML
[mysqld]
InnoDBの設定
innodb_buffer_pool_size = 3G # 全体メモリの約35-40%程度 innodb_log_file_size = 256M # innodb_buffer_pool_sizeの約1/10〜1/4程度 innodb_log_buffer_size = 32M # デフォルトのままか少し増やす innodb_flush_log_at_trx_commit = 2 # トランザクション性能と安全性のトレードオフ。2は一般的に性能が良い
その他バッファサイズ
key_buffer_size = 128M # MyISAMテーブルをほとんど使わない場合は小さくて良い tmp_table_size = 64M max_heap_table_size = 64M query_cache_size = 0 # WordPressでは通常無効化が推奨(WP Super Cacheがあるため) query_cache_type = 0 # 同上
接続数
max_connections = 200 # 同時接続数。サイトのトラフィックに応じて調整 thread_cache_size = 50 # スレッドの再利用を促進
ソートバッファ(メモリ使用量を減らすため、小さく設定)
sort_buffer_size = 1M join_buffer_size = 1M read_buffer_size = 1M read_rnd_buffer_size = 1M
説明:
innodb_buffer_pool_size: InnoDBのデータとインデックスをキャッシュする領域で、最も重要な設定です。メモリの約35-40%を割り当てました。
innodb_log_file_size: redoログファイルのサイズです。大きすぎるとリカバリに時間がかかりますが、小さすぎると頻繁にフラッシュが発生しパフォーマンスが低下します。
innodb_flush_log_at_trx_commit: データの耐久性とパフォーマンスのトレードオフです。2 は、1秒に1回ログをディスクにフラッシュするため、一般的なWebサイトで良好なパフォーマンスを発揮します。
query_cache_size, query_cache_type: WordPressのような動的なサイトでは、クエリキャッシュは逆にパフォーマンスを低下させる場合が多いため、0 に設定して無効化を推奨します。
2. PHP-FPM の設定
PHP-FPMの設定は /etc/php/8.4/fpm/pool.d/www.conf で行います。メモリ8GBの環境では、PHP-FPMのプロセス数を適切に設定することが重要です。
Ini, TOML
[www] pm = dynamic pm.max_children = 100 # 同時接続数。メモリ使用量を計算して調整 pm.start_servers = 20 pm.min_spare_servers = 10 pm.max_spare_servers = 40 pm.max_requests = 1000 # プロセスがこの数だけリクエストを処理したら再起動(メモリリーク対策)
説明:
pm = dynamic: プロセス管理方式を動的にします。
pm.max_children: 同時実行可能な子プロセスの最大数です。この値は、PHPスクリプト1つあたりの平均メモリ使用量(例: php -i | grep memory_limit で確認できる memory_limit の値��、実際にWordPressが消費するメモリ量)と、システム全体の利用可能なメモリ量に基づいて慎重に決定する必要があります。 例えば、1プロセスあたり約50MB消費すると仮定した場合、100 プロセスでは 50MB * 100 = 5GB のメモリが必要になります。この設定例では、PHPに多くのメモリを割り当てる想定です。
pm.start_servers, pm.min_spare_servers, pm.max_spare_servers: 起動時、アイドル状態、最大アイドル状態のサーバ数を設定します。
3. PHP (php.ini) の設定
/etc/php/8.4/fpm/php.ini で設定します。
Ini, TOML
memory_limit = 256M # WordPressの推奨値は256MB以上。プラグインなどに応じて調整 post_max_size = 64M upload_max_filesize = 64M max_execution_time = 300 max_input_time = 300
説明:
memory_limit: 各PHPスクリプトが使用できる最大メモリ量です。WordPressの一般的な要件を満たすために 256M を推奨します。
4. APCu の設定
APCuはユーザーデータのキャッシュに利用されます。/etc/php/8.4/fpm/conf.d/20-apcu.ini などで設定します。
Ini, TOML
extension=apcu.so apcu.enabled = 1 apcu.shm_size = 128M # キャッシュサイズ。サイトの規模に応じて調整 apcu.ttl = 3600 # キャッシュの有効期限(秒) apcu.enable_cli = 1 # CLIからのAPCu利用を許可
説明:
apcu.shm_size: APCuが利用する共有メモリのサイズです。WordPressのオブジェクトキャッシュとして利用する場合、サイトの規模に応じて調整してください。128MBは一般的な設定です。
5. OPcache の設定
OPcacheはPHPスクリプトのバイトコードをキャッシュし、実行速度を向上させます。JITを有効にします。/etc/php/8.4/fpm/conf.d/10-opcache.ini などで設定します。
Ini, TOML
zend_extension=opcache.so opcache.enable = 1 opcache.enable_cli = 1 opcache.memory_consumption = 256M # キャッシュサイズ。サイトのコード量に応じて調整 opcache.interned_strings_buffer = 16M opcache.max_accelerated_files = 10000 # キャッシュするファイルの最大数 opcache.revalidate_freq = 0 # 変更チェック頻度(開発中は1、本番では0で高速化)
; JIT設定 opcache.jit_buffer_size = 128M # JITが使用するメモリサイズ。メモリに余裕があれば増やす opcache.jit = 1255 # 推奨されるJITモード(全最適化)
説明:
opcache.memory_consumption: OPcacheが利用するメモリサイズです。WordPressと多数のプラグインを使用する場合、256MB以上を推奨します。
opcache.interned_strings_buffer: 内部化された文字列を保存するためのバッファサイズです。
opcache.max_accelerated_files: キャッシュできるPHPスクリプトファイルの最大数です。WordPressでは、プラグインの数によってはこの値を増やす必要がある場合があります。
opcache.revalidate_freq: スクリプトの変更をチェックする頻度です。本番環境では 0 に設定することで、変更チェックを行わなくなり、最大のパフォーマンスが得られます。コードのデプロイ後にopcache_reset()を実行するか、PHP-FPMを再起動する必要があります。
opcache.jit_buffer_size: JITがバイトコードをコンパイルした結果を格納するメモリサイズです。JITの効果を最大化するために、メモリに余裕があれば増やします。
opcache.jit: JITの動作モードを設定します。1255 は、すべてのJIT最適化を有効にする推奨設定です。
全体的なメモリ割り当ての目安
メモリ8GBの環境における、上記設定での大まかなメモリ割り当ての目安は以下の通りです。
MariaDB: 約 3.5GB (buffer_pool, 接続数など)
PHP-FPM: 約 3.5GB (1プロセス50MB x 70プロセス程度)
APCu: 128MB
OPcache: 256MB (JIT含む)
Lighttpd / OS / その他: 残り (約0.5GB〜1GB)
合計: 約 7.4GB〜7.9GB
この割り当てはあくまで目安であり、実際の使用状況によって変動します。特に pm.max_children の調整は重要で、システムがスワップアウトしないように、��ず稼働状況を監視しながら調整してください。
運用における注意点
監視: 各サービスのメモリ使用量を定期的に監視し、必要に応じて設定値を調整してください。free -h, htop, top, MariaDBのStatus変数、php-fpmのstatus、opcache_get_status() などを用いて監視できます。
スワップ: システムが頻繁にスワップアウトしている場合、メモリが不足している可能性があります。その場合は、各サービスに割り当てるメモリ量を減らすか、物理メモ��の増設を検討してください。
テスト: 設定変更後は、必ずテスト環境で十分な負荷テストを行い、安定稼働を確認してください。
WP Super CacheとLighttpdの連携: WP Super CacheとLighttpdの連携(luaスクリプト)は、PHPの実行をスキップして静的ファイルを直接配信するため、PHP-FPMの負荷を大幅に軽減します。これにより、PHP-FPMの pm.max_children を少し低めに設定できる可能性がありますが、キャッシュが効かないリクエスト(ログイン中のユーザー、管理画面など)に対してはPHP-FPMが動作するため、その点も考慮に入れてください。
ログの確認: 各サービスのログファイル(MariaDBのエラーログ、PHP-FPMのFPMログ、Lighttpdのアクセスログ/エラーログ)を定期的に確認し、問題が発生していないか確認してください。
これらの設定は、パフォーマンスと安定性のバランスを考慮したものです。サイトの特性に合わせて最適な設定を見つけてください。
0 notes
linuxtldr · 4 months ago
Text
0 notes