Storage in Dropbox

If I set the site path to be a completely different folder from the localwp core install,

And the site path’s drive is synced with Dropbox.

Is this enough to ensure that if my computer crashes, that everything is backed up including the database?

How would the restore process work exactly, Install Localwp and just point Localwp to this folder?

Thanks

Hi @localwprun

2025-04-14 Revised answer is further down in the conversation … short answer is now, yes.


Short Answer: No. The database files are stored else where on your personal computer; so, your instincts about having an incomplete backup (WordPress files only & no database) is correct.

Long Answer: You can find the database files on your personal computer, by visiting the ‘Database’ tab for a specific site. The ‘socket’ property shows the fully qualified operating system directory to where the database /mysql/data/ directory exists.

Warning: Any kind of bulk file copy-paste and later a copy-it-back solution for the database is NOT recommended. There are too many other delicate things that could go wrong and never quite re-align in the re-installed operating system solution.

Recommend: Explore the official ‘Cloud Backup’ solution by the LocalWp Team. It sounds like it will achieve what you are looking for … and it is a supported add-on.

1 Like

Thanks for explaining. I don’t see the “socket” property when I go to the Database tab. Why is that?

1 Like

Hi @localwprun

Guessing: Possibly due to running an older version of LocalWP on your personal computer?
The prior screenshots are from the latest release for MacOS. … or perhaps it is a Mac vs Windows thing. Dunno.

Digging Further: Looks like there might be a simple answer … due to a feature of LocalWP that is quite cool and not well advertised. Found this prior thread “Location of database files and software”.

Revised Answer: Your original question about ‘Is dropboxing the complete site files directory enough?’ … might be, yes, it is enough.

Condition: It appears that each time the LocalWP website is cleanly shutdown with the [Stop Site] button … it also does a database content export to the ./app/sql/ directory, existing next door to the WordPress files in the ./app/public/ directory.

So, as long as you use the LocalWP → Site → [Stop Site] button then you will have the WordPress Files and Database in the directory that you are also syncing to Dropbox.

Warning 1: Unfortunately, a clean graceful closing of the LocalWP v9.2.3 application does NOT action the database content export into the ./app/sql/ directory for any active/started site. It only happens when [Stop Site] button is intentionally clicked.

Warning 2: Unfortunately, if your personal computer suddenly shuts down ungracefully (like a windows bluescreen of death) and LocalWP does not get a chance to do it’s graceful [Stop Site] housekeeping … then the answer is no because the database content export to the ./app/sql/ directory would not have been actioned.

Restore Process: A re-install process would look something like:

  1. Re-install the LocalWP application.

  2. Create a new blank site within LocalWP; pointing to a new directory that is not the same as the old one you want to restore.
    Hint: Just in case you already-have or still-have dropbox actively syncing that original directory (that you do not want to overwrite).

  3. Click [Start Site] and then [Stop Site] to confirm the new LocalWP empty site is working as expected.

  4. Copy the older/original dropbox ./app/ directory contents over to the new site ./app/ directory.
    Hint: This will include the sub-directories for the WordPress files (./app/public/) and for the last clean sutdown database content export (./app/sql/).
    Hint: This is intentionally avoiding anything to do with the ./conf/ directory which needs to remain untouched.

  5. Click [Start Site] button to activate the running services again, including the database.

  6. In LocalWP → Site → Database tab … click [Open AdminerEvo] link to open the database manager.

  7. For the local database, Import the ./app/sql/local.sql database content exported file and then click [Execute] button.

  1. Congratulations, the LocalWP new site is now fully restored from the older dropbox files (WordPress & Database).

Note: I have tested the above sequence, including a manual dodgy tweak to the local.sql file to rename the website title (aka the blogname record) and then re-do the database import … works beautifully.

1 Like

Thank you for all of your help here @johnlang86! Also I can confirm that the socket piece you mentioned is MacOS specific so that’s why @localwprun wouldn’t see it on Windows.

1 Like

Thanks John, I’m going to try this!

Can you clarify one part.

Did I read it correctly, that the local.sql file should be copied into the sql folder (as well as import in AdminerEvo). Or just leave the local.sql file of the new blank site as it is and import the database in AdminerEvo only?

Thanks.

I just tried it and it works! This is great. (its not necessary to copy the sql file, just need to import it)

Thanks for explaining this John.

2 Likes