Skip to content

Run SQLite import WP-CLI command with default PHP version - #559

Merged
fluiddot merged 1 commit into
trunkfrom
fix/import-database-php-version
Sep 25, 2024
Merged

Run SQLite import WP-CLI command with default PHP version#559
fluiddot merged 1 commit into
trunkfrom
fix/import-database-php-version

Conversation

@fluiddot

@fluiddot fluiddot commented Sep 24, 2024

Copy link
Copy Markdown
Contributor

Related to #558.

Proposed Changes

  • Allow passing the PHP version to be used when running a WP-CLI command.
  • Use default PHP version (8.1) when running sqlite import WP-CLI command. Using a PHP 8 version is required due to SQLite plugin (used in the WP-CLI command) using functions only supported in PHP 8+.

Testing Instructions

  • Run the app with the command npm start.
  • Create a site.
  • Change the PHP version of the site to 7.4.
  • Navigate to the Import/Export tab.
  • Import a full Jetpack backup file.
  • Observe the import process succeeded.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@fluiddot fluiddot added [Type] Bug Import & Export Related to the Import & Export functionality in Studio. labels Sep 24, 2024
@fluiddot
fluiddot requested a review from a team September 24, 2024 15:48
@fluiddot fluiddot self-assigned this Sep 24, 2024
@fluiddot fluiddot linked an issue Sep 24, 2024 that may be closed by this pull request

@wojtekn wojtekn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code change looks clear.

I reproduced the issue using Studio 1.1.2 and confirmed that this PR fixes that - I was able to import Jetpack Backup to a site that uses PHP7.

@fluiddot
fluiddot merged commit ffb7703 into trunk Sep 25, 2024
@fluiddot
fluiddot deleted the fix/import-database-php-version branch September 25, 2024 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Import & Export Related to the Import & Export functionality in Studio.

2 participants