Part 1 of 7 · Forex Rates Site

Why My Second Rate Site Was So Much Faster to Build

pakistanforexrates.today, my second rates site, took a fraction of the time the silver site did, and not because I worked harder. It was faster because the first build had quietly produced a kit, and this post is an honest inventory of what transferred, what genuinely differed, and the discipline that makes second builds fast, changing data, not code.

The inventory of what carried over is almost embarrassing. The plugin skeleton, one data table appended with history, city-dimensioned, read through a small family of accessor functions. The shortcode engine, register views once, parameterise by attributes. The theme installer, idempotent pages, menus, and legal copy on activation. The honesty rules, visible timestamps, no fake fallbacks, sanity-ranged parsing. The Elementor cooperation, wp_body_open rendering with yield-to-Pro. Every one of those was a wall the silver series paid for, and the forex site inherited them as settled law.

The discipline that made inheritance clean was pushing differences into configuration instead of forking code. Where the silver plugin knew metals, the forex plugin knows currencies, and the difference lives in data structures the shared machinery reads:

// the second build changes THIS, not the engine
function pfr_currencies() {
    return array(
        'USD' => 'US Dollar',   'GBP' => 'British Pound',
        'EUR' => 'Euro',        'SAR' => 'Saudi Riyal',
        'AED' => 'UAE Dirham',  // remittance corridors matter in Pakistan
    );
}

// rates table: currency | buying | selling | market_type | recorded_at
// shortcodes: [forex_rate_live currency="USD"], [forex_rate_table],
//             [forex_converter], [forex_rate_graph currency="GBP" days="60"]

Same append-only history, same accessor-then-shortcode layering, same installer creating the hub and currency pages with unique written content, because the thin-content lesson transferred too, a USD page and a SAR page serve different readers, remittance families versus importers, and their words had to know it. The schema did shift where the domain shifted, currencies quote as buying and selling pairs rather than one price, and as the next post covers, in two distinct markets, so the table gained columns the silver site never needed, which is exactly the point, the kit flexed at the genuinely different places and nowhere else.

The honest caveat about second builds, speed is inherited only where lessons are, and I caught myself twice about to re-fight settled wars, once nearly rebuilding city pages as virtual routes because it would be quick. The kit’s value is not just code, it is the recorded verdicts, and the fast second build is mostly the discipline of trusting them.

A few things people ask me about this

Should I copy the first project’s folder or extract a shared library? For two sites, a disciplined copy with config-driven differences is honest and fast. Extract a shared library when a third consumer appears, before that, the abstraction is speculation.

How do I stop a copied project drifting into a mess? Keep a rule, differences go in data structures and options, engine changes must justify themselves for both sites. When an engine change helps only one, it is usually configuration in disguise.

Next

The domain itself held the first real surprise, in Pakistan the dollar rate is not one number, it is two, from two different markets. That split, and how the schema and pages honour it, is the next post.

Leave a Reply

Your email address will not be published. Required fields are marked *