DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk10 min

Continuous Deployment for WordPress with Bitbucket Pipelines

A practical guide to deploying WordPress from Bitbucket Pipelines with staged promotion, SSH, rsync or SCP, secure exclusions, provider integrations, and a separate plan for databases and uploads.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Yes. Bitbucket Pipelines can deploy WordPress automatically: keep the code your team owns in Bitbucket, build and test it in a Linux container, then transfer an approved revision to a staging or production server over SSH. The transfer can use rsync, SCP, or a hosting provider’s maintained Pipe.

The reliable design treats WordPress as two systems. Git contains themes, custom plugins, mu-plugins, dependency definitions, and build scripts. The server separately holds the database, uploaded media, configuration secrets, caches, and other runtime state. A pipeline can move code consistently, but it does not automatically solve database migrations, media synchronization, cache invalidation, or database rollback.

As an Amazon Associate I earn from qualifying purchases.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What a WordPress deployment pipeline should do

A production workflow normally has five parts:

  1. Source: Bitbucket stores the deployable WordPress code and the pipeline definition.
  2. Build: the runner installs dependencies and creates production assets.
  3. Test: automated checks stop a bad revision before it reaches a server.
  4. Promotion: a revision moves to staging, then to production after approval or a controlled trigger.
  5. Transfer: an SSH-authenticated step synchronizes files or copies a built artifact.

Bitbucket describes Pipelines as an integrated CI/CD service with build, test, deploy, artifacts, and a YAML configuration reference. Its deployment environments let you model separate staging and production targets, including canary, monitoring, and full-deployment stages.

Decide what belongs in the repository

Commit every deployable component that the team owns and can reproduce:

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
  • The active theme and any child theme.
  • Custom plugins and must-use plugins.
  • Composer or npm manifests and lock files.
  • Build scripts for CSS, JavaScript, images, or other compiled assets.
  • Automated tests and code-quality configuration.
  • The bitbucket-pipelines.yml file.

Keep operational data out of the code repository unless your hosting design explicitly manages it there:

  • The WordPress database, including posts, pages, settings, users, and plugin data.
  • The wp-content/uploads directory and other user-generated media.
  • wp-config.php, environment files, API tokens, and production passwords.
  • Runtime caches, logs, temporary files, and server-specific configuration.

A common pattern is to commit a safe configuration template and inject environment-specific values at deploy time. Never place a private SSH key or a production database dump in Git.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Build the pipeline in stages

Start with a build-and-test step, preserve the resulting artifact when appropriate, and deploy only from an approved branch or promotion action. The following example is intentionally generic; adapt package installation, test commands, and paths to your project.

image: ubuntu:22.04

pipelines:
  branches:
    develop:
      - step:
          name: Build and test
          caches:
            - node
          script:
            - apt-get update
            - apt-get install -y git openssh-client rsync nodejs npm php-cli composer
            - composer install --no-dev --prefer-dist --no-interaction
            - npm ci
            - npm run build
            - npm test
          artifacts:
            - build/**
            - vendor/**
      - step:
          name: Deploy staging
          deployment: staging
          script:
            - rsync -az --exclude='wp-config.php' --exclude='wp-content/uploads/' --exclude='.git/' build/ deploy@example-host:/var/www/staging/

    main:
      - step:
          name: Build and test production candidate
          script:
            - apt-get update
            - apt-get install -y git openssh-client rsync nodejs npm php-cli composer
            - composer install --no-dev --prefer-dist --no-interaction
            - npm ci
            - npm run build
            - npm test
          artifacts:
            - build/**
            - vendor/**
      - step:
          name: Deploy production
          deployment: production
          trigger: manual
          script:
            - rsync -az --exclude='wp-config.php' --exclude='wp-content/uploads/' --exclude='.git/' build/ deploy@example-host:/var/www/production/

This is a pattern, not a drop-in file. Replace the image, packages, test commands, artifact paths, SSH destination, and document root. If your repository itself is the deployable tree, synchronize that tree instead of build/. If dependencies are built on the server, remove the corresponding artifact steps and make that server-side process explicit.

Artifacts versus a live checkout

An artifact is a precise output of a tested commit. It makes the production step independent of later changes and gives you a concrete object to redeploy. A live checkout is simpler for some hosts but requires the server to have Git credentials, a compatible runtime, and a defined checkout procedure. For either model, record the commit identifier in the deployment log.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

Configure SSH without widening access

  1. Generate a dedicated deployment key on an administrative workstation, preferably ED25519: ssh-keygen -t ed25519 -C 'bitbucket-wordpress-deploy'.
  2. Add the public key to the target account’s authorized_keys file. Use a deployment account with access only to the intended release directory, not a general administrator account.
  3. Store the private key in Bitbucket Pipelines SSH settings or as a secured, masked variable. Do not print it in a script or commit it to the repository.
  4. Verify the server host key out of band and provide the verified entry through known_hosts. Do not make a first connection with blind host-key acceptance.
  5. Confirm that the runner image contains the OpenSSH client and, for rsync, the rsync package.
  6. Test a read-only connection before enabling writes: ssh -o BatchMode=yes deploy@example-host 'printf ready'.

Atlassian documents that the BITBUCKET_SSH_KEY_FILE default variable contains the location of the private SSH key file inside the pipeline environment. Use that path in commands when the pipeline’s SSH integration provides it, rather than copying key material into ad-hoc files.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Restrict the key where your host permits it. A forced command, limited directory, no-agent-forwarding, and no-port-forwarding policy can reduce the damage from a compromised key. Rotate the key when staff, vendors, or infrastructure change.

Choose rsync, SCP, or a hosting Pipe

Method How it transfers code Best fit Main caution
rsync over SSH Synchronizes directory trees and sends only changed files; supports excludes and optional deletion. Repeated deployments of a WordPress code tree where uploads, configuration, and caches must be excluded. A misplaced --delete can remove files on the destination. Test exclusions on staging first.
SCP over SSH Copies selected files or a packaged artifact. Simple, immutable release bundles or small sets of files. It does not provide rsync’s tree comparison and exclusion behavior; you must define what is copied.
Hosting Pipe A provider-maintained Bitbucket integration wraps deployment conventions and authentication. Hosts that document and support a Pipe for WordPress code deployment. You inherit the Pipe’s versioning, defaults, and file-selection rules. Read them before production use.

Using rsync safely

Begin without deletion:

rsync -az --exclude='wp-config.php' --exclude='wp-content/uploads/' --exclude='.git/' ./ deploy@example-host:/var/www/site/

After comparing a dry run against staging, you can add --delete only when the destination directory is exclusively managed by the pipeline and your exclude list protects runtime data:

rsync -azn --delete --exclude='wp-config.php' --exclude='wp-content/uploads/' --exclude='.git/' ./ deploy@example-host:/var/www/site/

The -n option shows the proposed changes without writing them. Review that output, then remove -n for the real deployment. Never point a destructive synchronization at a directory that also contains logs, manually uploaded files, or host-managed content.

Using SCP for a release archive

Package only the tested files, copy the archive, and extract it into a release directory on the host:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
tar -czf wordpress-release.tgz --exclude='.git' --exclude='wp-content/uploads' --exclude='wp-config.php' .
scp wordpress-release.tgz deploy@example-host:/var/www/releases/
ssh deploy@example-host 'tar -xzf /var/www/releases/wordpress-release.tgz -C /var/www/site/'

For zero-downtime or atomic releases, extract into a new, timestamped directory and switch the web server’s release symlink in a separate, host-specific command. The pipeline must also define how permissions, ownership, and writable directories are set.

Use deployment environments and controlled promotion

Create separate Bitbucket deployment environments for staging and production. Keep hostnames and environment-specific variables scoped to the matching environment. A typical promotion path is:

  1. Every pull request runs build and test checks.
  2. A merge to the integration branch deploys staging automatically.
  3. Smoke tests and stakeholder review run against staging.
  4. A protected production branch or a manual promotion starts the production step.
  5. Production monitoring runs before the deployment is considered complete.

For high-risk changes, split production into a canary deployment, a monitoring interval, and a full deployment. Bitbucket’s deployment documentation describes these as separate stages. A canary can target a subset of traffic or an isolated production node, but the traffic switch and health checks are hosting responsibilities that the pipeline must call explicitly.

Protect the production branch and require the review rules appropriate to your team. A pipeline should not deploy arbitrary feature branches merely because they can reach the YAML file.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Provider-specific integrations

WP Engine Pipe

WP Engine documents a Bitbucket Pipe for WordPress code deployment. Its instructions cover ED25519 SSH-key generation and expose rsync options such as --delete and exclude rules. Treat those flags as operational controls: inspect the Pipe’s current defaults, pin a tested Pipe version where supported, and validate its exclusions on a staging environment before production.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Kinsta SSH deployment

Kinsta documents automatic WordPress code deployment after a commit through SSH and Bitbucket Pipelines. The exact host paths, account setup, and trigger behavior are provider-specific, so use the provider’s current instructions rather than assuming that a generic SSH destination or document root applies.

These integrations address code transfer. Neither example establishes automatic database migrations, media synchronization, cache invalidation, or database rollback; those tasks still need an explicit runbook.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Handle WordPress runtime state separately

A successful file transfer can still produce a broken site if runtime state is ignored. Define these operations before calling a deployment complete:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Database changes

Version schema changes with the plugin or application that owns them. Run migrations in a controlled step after taking a verified database backup, and make the migration command safe to run once or detect that it has already completed. A code rollback does not automatically reverse a database migration.

Uploads and media

Keep wp-content/uploads outside ordinary code synchronization. If multiple servers need the same media, document the storage or replication mechanism separately. Do not use a blanket --delete against a directory containing editorial uploads.

Configuration and secrets

Supply database credentials, salts, API keys, and environment flags through the host or secured variables. Ensure the deployed code can identify staging versus production without committing production values.

Caches and queues

Decide whether deployment should purge page caches, object caches, opcode caches, or background queues. A cache purge may require a provider API or a host command and is not implied by rsync or SCP.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Security and reliability checks

  • Use a separate SSH key and account per environment where practical.
  • Verify host keys and fail closed on an unknown host.
  • Mask secrets and avoid commands that echo them.
  • Review the exact source and destination paths before enabling deletion.
  • Exclude configuration, uploads, logs, caches, and repository metadata explicitly.
  • Pin or periodically review third-party Pipe versions and their defaults.
  • Log the commit, environment, operator or trigger, and result of each deployment.
  • Back up the database before migrations and test restoration, not just backup creation.
  • Use a staging environment that resembles production enough to expose permission and path errors.

Troubleshoot common failures

Symptom Likely cause Action
Permission denied during SSH Wrong key, username, authorized-key permissions, or server-side directory ownership. Run a verbose SSH test, confirm the key selected by the pipeline, and grant the deploy account write access only to the release path.
Host key verification failed The runner lacks the verified host key or the server fingerprint changed. Compare the new fingerprint through a trusted channel, then update the environment’s known_hosts; never bypass verification blindly.
Files deploy but WordPress shows a fatal error Missing built assets, incompatible PHP dependencies, incorrect permissions, or an unrun migration. Inspect the artifact contents and server logs, verify the PHP/runtime requirement, and execute the documented migration or dependency step.
Uploads disappear A broad rsync source or --delete touched runtime media. Restore from backup, narrow the source directory, and add an explicit uploads exclusion before redeploying.
Production deploy starts unexpectedly The production branch or deployment trigger is not protected. Require a protected branch, manual trigger, or promotion step and test the rule with a non-production change.
Pipeline passes but the old site is served Wrong document root, stale cache, or a release symlink was not switched. Confirm the remote path, check the active release, and run the documented cache or symlink action.

Plan rollback before the first release

  1. Keep the previous successful artifact or release directory available.
  2. Record the exact Git commit deployed to each environment.
  3. For a code-only fault, redeploy the previous artifact or revert the commit and run the normal pipeline.
  4. For a database change, follow the separate database recovery plan; do not assume that reverting files restores database state.
  5. Restore uploads or other runtime data only from a verified backup or documented replication source.
  6. After rollback, run smoke tests and record the cause and corrective action.

Git provides a strong recovery path for code, but it is not a substitute for backups of the database and media.

Pre-production checklist

  • The repository contains only the code and build inputs the team intends to deploy.
  • Build and test steps pass in the same class of Linux environment used for deployment.
  • Artifacts are identifiable by commit and contain all required production assets.
  • SSH access works with a least-privilege account and verified host key.
  • Staging and production variables are separated and masked.
  • Rsync exclusions have been reviewed, and deletion is disabled until a dry run is understood.
  • Database migration, backup, media, cache, and rollback procedures are written down.
  • Production promotion requires the intended approval or manual action.
  • A smoke-test list verifies the homepage, authentication, forms, critical integrations, and representative content after deployment.

With those controls in place, Bitbucket Pipelines becomes the repeatable delivery mechanism: a tested WordPress revision is promoted through defined environments and transferred over a constrained SSH connection, while database and media operations remain explicit rather than being hidden inside a file-copy command.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.