Support Log in

Performance Optimization

User Guide
Prefer video? Watch the Lang Forge tutorials 9 short guides covering every feature Watch

Lang Forge is designed to be lightweight and fast. However, large multilingual sites with thousands of pages and many languages benefit from understanding how Lang Forge handles performance and what steps you can take to keep your site running smoothly.

How Lang Forge Handles Performance Internally

Lang Forge uses several techniques to minimize its performance footprint:

Single-query language detection. When a visitor requests a page, Lang Forge determines the language from the URL in a single operation. It does not scan cookies, headers, or multiple database fields — the URL is the primary language signal, and the check is nearly instantaneous. In-memory translation cache. After determining the language, Lang Forge loads all translation mappings for the current page into memory in one database query. Every subsequent translation lookup during that request (menus, widgets, related posts, language switcher) reads from the in-memory cache without additional queries. Lazy loading of translation data. Translation metadata (like Content Diff snapshots and Translation Memory matches) is only loaded when you access the admin pages that need it. Frontend page loads never touch these heavier data tables. Efficient hreflang generation. Hreflang tags are generated using cached translation group data. Even pages with translations in 20 languages produce their hreflang tags without 20 separate database queries — the translation group is loaded once and all tags are generated from that single result.

Caching Strategies

Proper caching is the single most effective way to ensure fast page loads on a multilingual site:

Page caching (required).

Install a page caching plugin (WP Rocket, LiteSpeed Cache, W3 Total Cache, or WP Super Cache). Page caching stores the fully rendered HTML of each page so that subsequent visitors receive the cached version without any PHP or database processing. Since each language has its own URL, each language version is cached independently.

Object caching (recommended).

If your hosting supports Redis or Memcached, install an object cache plugin (Redis Object Cache is popular). Object caching stores database query results in memory, so even the first visitor after a cache clear gets faster responses. Lang Forge’s translation mapping queries benefit significantly from object caching.

Browser caching.

Make sure your server sends proper cache headers for static assets (CSS, JavaScript, images). This is typically handled by your hosting or caching plugin. Lang Forge’s admin CSS and JavaScript files include version numbers in their filenames, so they are automatically cache-busted when the plugin updates.

CDN (recommended for global audiences).

A content delivery network like Cloudflare, BunnyCDN, or AWS CloudFront serves your pages from servers close to each visitor. For multilingual sites targeting different countries, a CDN dramatically reduces load times for international visitors. No special CDN configuration is needed — each language URL is cached and served independently.

Best Practices for Large Multilingual Sites (1,000+ Pages)

Large sites require a few extra considerations to maintain optimal performance:

1. Limit translatable content types.

Only enable translation for content types that actually need it. If you have a Custom Post Type for internal documentation that visitors never see, leave it out of Translatable Content. Every enabled post type adds to the translation mapping data that Lang Forge manages.

2. Publish translations progressively.

Avoid publishing 10,000 translated posts simultaneously. Publish in batches of 100 to 500 to give caching systems time to build their caches. A sudden influx of new pages can cause a “cache stampede” where many visitors hit uncached pages at the same time.

3. Use the database optimization tool.

Go to Lang Forge > Tools > Optimize Database periodically (monthly for large sites). This tool:

  • Rebuilds indexes on Lang Forge’s translation tables
  • Removes orphaned translation metadata from deleted posts
  • Cleans up expired Translation Memory entries
  • Reports the current database table sizes
4. Monitor query performance.

Install the Query Monitor plugin during development and testing. It shows you exactly how many database queries each page load generates and which ones are slowest. Look for any Lang Forge queries that take more than 10 milliseconds — this usually indicates a missing index, which the optimization tool can fix.

5. Consider a dedicated database server.

For sites with more than 5,000 pages and 5 or more languages (resulting in 25,000+ total posts), the database becomes the primary bottleneck. Moving from shared hosting to a VPS or managed WordPress host with a dedicated database server provides a significant performance improvement.

Database Optimization Tips

Lang Forge stores translation data in custom database tables that are optimized for read-heavy workloads. Here are tips for keeping the database performing well:

Keep the post table clean.

Delete old revisions, trashed posts, and spam comments regularly. WordPress stores revisions for every translated post, so a site with 1,000 pages in 5 languages may have 5,000 posts plus tens of thousands of revisions. Use a plugin like WP-Optimize or WP Sweep to clean up regularly.

Optimize the wp_options table.

The wp_options table is loaded on every WordPress request. If it grows very large (common on sites with many plugins), it slows down every page load. Run DELETE FROM wp_options WHERE autoload = 'yes' AND option_name LIKE '_transient_%' periodically (or use a plugin) to clean expired transients. Lang Forge stores its settings as a single autoloaded option, keeping its footprint minimal.

Monitor Translation Memory size.

Translation Memory grows with every translation you create. For most sites, TM size is not a concern. But if your TM contains more than 100,000 pairs (possible on large sites after years of use), consider archiving older, less-used pairs. Go to Lang Forge > Translation Memory, sort by “Last Used” date, and delete pairs that have not been matched in over a year.

Index custom meta queries.

If your theme or other plugins run custom meta_query operations on translated posts, make sure the relevant meta_key values are indexed. WordPress does not add indexes to wp_postmeta by default. Your hosting provider or a database administrator can add targeted indexes for your most frequently queried meta keys.

Performance Monitoring Checklist

Use this checklist monthly (or after major content additions) to keep your multilingual site fast:

CheckHow to verifyTarget
Page load time (frontend)Use Google PageSpeed Insights or GTmetrixUnder 3 seconds
Database queries per pageUse Query Monitor pluginUnder 50 queries
Page cache hit ratioCheck your caching plugin’s statisticsAbove 90%
Database table sizesRun Lang Forge > Tools > Optimize DatabaseTranslation tables under 100 MB
Object cache hit ratioCheck Redis or Memcached statisticsAbove 80%
Translation Memory sizeCheck Lang Forge > Translation Memory dashboardUnder 100,000 pairs (archive older pairs if exceeded)

> Tip: The biggest performance win for most multilingual sites is page caching. If you install no other optimization tool, install a page caching plugin. It eliminates the vast majority of server-side processing for repeat visitors.

> Good to know: Lang Forge adds no frontend JavaScript on pages where the language switcher is not present. If a page does not have a switcher widget or shortcode, there is zero JavaScript overhead from Lang Forge on that page. The language switcher itself loads a single lightweight script (under 5 KB) for the dropdown interaction.

Forge AI Assistant Online

Hi! I'm the Lang Forge AI assistant. Ask me anything about the plugin — setup, features, troubleshooting, or development.

Just now
Powered by Forge AI · Browse docs