I remember how kind you have been to me, and I want to save you the massive headache of rebuilding your site from scratch.
To answer your main question immediately: Do not move to IIS. Moving a PHP/MySQL application (like WordPress/Directorist) to a Windows/IIS environment will almost certainly make performance worse, not better. PHP is native to Linux, and IIS adds significant overhead.
The "smoking gun" in your description is that you see no CPU, RAM, or Disk peaks while it is being slow.
This indicates your server isn't "working hard"-it is waiting.
Here is exactly what is likely happening and how to fix it.
The Problem: Transaction Safety vs. Speed
By default, MariaDB is configured to be 100% "ACID compliant." This means that for every single change (write) you make to the database, it forces the hard drive to physically spin, write the data, and confirm "I have saved this" before it lets WordPress move on to the next step.
When you are updating a directory with 130,000 entries, this introduces massive latency. Your powerful CPU is sitting idle for milliseconds at a time, thousands of times per second, waiting for the physical disk to say "okay."
The Solution: Change one MariaDB Setting
You need to change the innodb_flush_log_at_trx_commit setting.
- Current (Likely) Setting:
1 (Write to disk immediately after every transaction. Safest, but slowest.)
- New Setting:
2 (Write to OS cache immediately, flush to physical disk once per second.)
Why this fixes it:
This tells MariaDB to dump the data to the operating system's memory buffer and move on instantly. The OS will then lazily write that to the disk in the background. This typically speeds up write operations (like imports or mass updates) by 10x to 100x without adding any CPU load.
The Risk: If your server loses power completely (hard crash), you might lose the last 1 second of data. For a directory website, this is usually an acceptable trade-off for the massive speed gain.
How to apply the fix
- Locate your config file: Usually found at
/etc/mysql/my.cnf or /etc/my.cnf.d/server.cnf (depending on your Linux distribution).
- Edit the file: Look for the
[mysqld] section.
- Add/Modify this line:
innodb_flush_log_at_trx_commit = 2
- Restart MariaDB:
systemctl restart mariadb
Other Checks for Directorist
If the above doesn't solve it completely, check these specific Directorist bottlenecks:
- Geocoding: If you have "Map" or "Geolocation" features enabled, Directorist might be trying to contact Google Maps API to fetch coordinates for every listing you save. This is a huge hidden delay. Check Directory Builder -> Settings -> Map Settings and try temporarily disabling geocoding to test speed.
- Image Optimization: If you are uploading images with listings, ensure you aren't using a plugin that compresses images on upload (like Smush or EWWW) during bulk operations. This halts the database write until the image CPU processing is done.
Summary
- Don't switch to IIS.
- Don't blame your CPU/RAM.
- Do change the MariaDB flush setting to
2.
This single configuration change often instantly solves the "slow write, idle CPU" mystery.
... Directorist Tutorial ...
I've selected this video because it provides a comprehensive overview of the Directorist plugin's capabilities and settings, which may help you identify if a specific feature (like map integration) is contributing to the write latency.
Would you like me to guide you on how to check if your server uses innodb_flush_log_at_trx_commit without restarting it first?