php - PHP and Wordpress Memory Suggestions to Speed up Slow Website
问题描述
cry for help here... need help with actual memory limits for PHP and Wordpress - am I using too much? My Wordpress is so slow I am about to give up...
I know how to increase php and Wordpress memory so that's not the topic but I need help with actual memory limits - I tried many variations and my Wordpress site at first runs quickly but after few hours it just barely loading... I tried to bump up to a larger instance in Lightsail (4 times more memory, 4x cpu) - that didn't make any difference and my smaller instance seem to run faster, something tells me I am having memory allocation issues...
here's my settings : My Setup: Lightsail 512M, Aurora RDS, PHP 7.2.13, Apache, WordPress 5.2.
Lightsail instance comes with 512M of memory so I allocated it as follows:
PHP: 512M - am I crazy allocating all server memory to PHP, should I leave some for XYZ, if so for what?
Wordpress Max (admin) 256M - good or too much?
Wordpress Front end: 128M - my best guess this is ok.
I have about 85 plugins that I tried to deactivate/activate and of course deactivating all of them solves the problem but wonder what else I can/should do to speed my site up.
Any help is appreciated!
解决方案
首先,85 个插件是一大堆插件,这将大大降低您的网站速度。当我最多做开发时,我最喜欢有 5 个顶部。也不知道您使用的是什么主题,主题的编写方式也会减慢网站速度。干净的代码 = 快速的网站。
如果您无法整合插件,您应该考虑缓存该站点,前提是它不会有很多更改。根据您的主机,一些 Wordpress 主机(例如 Flywheel 和 WP Engine)能够在您的管理面板中打开缓存。
如果您的主机不允许这样做......叹......插件可以这样做。但是85个插件太多了。有了所有的电话,他们将使网站快速运行几乎是不可能的。
推荐阅读
- python - 为什么 sum 的行为与加号 (+) 操作不同
- javascript - JavaScript / TypeScript:`Object.assign({}, myClass)`/`Object.create(myClass)`和构造函数`new MyClass()`之间的区别
- javascript - 无法读取未定义 vue.js 的属性“查找”
- typescript - Vue 3 中自定义类型的“找不到导入”(使用 Vite/Vitesse)
- webrtc - Svelte - ReferenceError:未定义缓冲区
- pandas - 找到至少某个值的第一个值
- reactjs - 如果选择了特定的选择选项,则验证和呈现字段(React-Hook-Form 和 React-Select)
- r - ggplot geom_line 绘图问题
- php - 从负数或正数开始计算股票交易中的股票平方
- php - Codeigniter 全局变量问题