Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to backup my Wordpress code to bitbuckets

Matthew Berger
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 3, 2024

Hi. Where do I find my backup source and database code in Wordpress and how do I transfer it to my bitbuckets repository? 

1 answer

1 vote
Jim Knepley - ReleaseTEAM
Atlassian Partner
July 3, 2024

I do not suggest this for most use cases. You might get away with it if you mean to build and publish the site in a CICD process.

My WordPress site isn't "live" on the Internet, and only exists in a private VM. In my environment, The WordPress install location on my VM is a git repository, which you should probably never do.

My deployment process mirrors the site using wget and saves the pages in a different directory. The static pages are copied to an AWS S3 bucket for static hosting.

Never include a .git directory in a published website, ever. It is a target for people doing naughty things.

I do backups in two stages:

1. Use pg_dump/mysqldump to create a database dump and store it in the repository. My database is small enough that I don't compress it, your mileage may vary.

2. Do the usual git add, commit, push process.

Restoration is as simple as rolling back a commit.

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events