Deploy time

  • Unknown's avatar

    We are experiencing two major issues when deploying from Dev to Staging:

    • Excessive Downtime: The deployment process takes 1 hour and 7 minutes, which is far beyond the expected duration.
    • Broken Media Links: Image URLs are failing to update correctly after deployment, causing images to not display on the frontend.

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    The excessive downtime and broken media links during your deployment suggest that your current process is likely relying on a manual, file-by-file transfer or a “heavy” plugin-based migration rather than an atomic deployment. An hour-long window usually indicates that the server is struggling to move large volumes of data—likely your uploads folder—while simultaneously trying to rewrite the database. To fix the broken links, you need to perform a Search and Replace on the database to swap the Dev URL for the Staging URL; simply moving the files isn’t enough because WordPress stores “absolute paths” (the full URL) for every image in its database. Instead of a manual move, you should use a tool like WP-CLI or a dedicated migration plugin that handles the URL serialization correctly and move the site in “chunks” to avoid timing out the server.To slash that hour-long downtime, you should adopt a “Push” deployment strategy where you only move the database and the specific theme/plugin files that have changed, rather than re-uploading the entire media library every time. Since you are on a WordPress.com Staging environment, you can use SFTP or GitHub Integration to automate the file transfers, which should take seconds rather than minutes. For the media links, specifically check if your images are being served via a CDN (like Jetpack), as these sometimes “lock” the old URL in their cache; clearing the Jetpack/Photon cache or using a plugin like “Better Search Replace” on the Staging site will instantly fix those broken image paths by updating the database entries to match your wpcomstaging.com address.

Log in or create an account to reply