Menu

WordPress Feels Slow? Profile Plugins and Queries Before You Buy More Hosting
📰

WordPress Feels Slow? Profile Plugins and Queries Before You Buy More Hosting

DEV Community: database·AumCreate·about 5 hours ago
#90mSZO63
#devtodatabase#devto#dev#wordpress#article
Reading 0:00
15s threshold

A slow WordPress page is not automatically a hosting problem. Before you upgrade, split the time into three buckets: PHP/plugin execution, database query time, and network time to first byte. If query time is low and PHP time is high, a bigger database does not help. If query time is high, a faster CPU can hide a missing index for a while. Profile before you upgrade.

Step 1: Measure a stable baseline

Use a staging copy with the same plugins and data. Measure the uncached page for profiling, then measure the cached page separately.

URL = "https://staging.example.com/"

for i in 1 2 3 4 5 ; do curl -s -o /dev/null -w '%{time_starttransfer}' " $URL " ; echo done

Enter fullscreen mode

Exit fullscreen mode

Do not trust one run. Use the median of several runs.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.