Loading...

如何增加WordPress網站的PHP時間限制?

Temperature: 0 °C

Mark ChangMark Chang
author_tools

PHP時間限制是您的網站在超時之前將花費在單個操作上的時間。當操作達到設置的時間限制時,它將返回錯誤。
大多數主機上的PHP時間限制的默認值是30秒。
因此在WordPress必須透過修改wp-config.php的方式來延長時間限制。
在WordPress的wp-config.php中添加以下code

define( 'WP_DEBUG', false );
set_time_limit(3000);
/* That's all, stop editing! Happy publishing. */
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', __DIR__ . '/' );
}

以上代碼樣本中的3000表示3000秒。
隨時將其更改為任何適當的數字。

以上紀錄

如何增加WordPress網站的PHP時間限制?
 

https://innstory.com/story-如何增加WordPress網站的PHP時間限制-2278
WORDPRESS

Prev
 修改phpini更改允許上傳檔案的大小

Next
ubuntu_1804__apache_目錄啟用並開啟htaccess_覆寫 

About the Author

Mark Chang

離不開電腦的宅男

Visitor message

Leave some footprints to prove that you visited me

Recommended reading

Author's other related stories

使用curl執行POST請求

使用curl執行POST請求...

curl命令是一個利用URL規則在命令行下工作的文件傳輸工具。 支持文件的上傳和下載。 這邊範例使用...

使用.htaccess關閉特定文件的緩存

使用.htaccess關閉特...

以特定檔案為例 <Files page.php> FileETag None Header unse...

當域名 DNS 尚未生效時,如何預先設定及測試網站

當域名 DNS 尚未生效時,...

建置一個新的網站或是將網站搬家時 常常會遇到一個問題,就是要將網址指向到新的網站空間,設定完畢但需要...

Please select an option

error

Hi, thank you for your participation, but you cannot vote repeatedly~

Join innstory now and start recording your story.

"Innstory" is a place to store stories. We are committed to becoming a warm platform. Deepening the bonds between people is our direction.
We are convinced that the blockchain between people is not just a cold calculation. Join us now.

Wrong format