Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

fluiddot
Copy link
Contributor

@fluiddot fluiddot commented Sep 24, 2024

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 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
Copy link
Contributor

@wojtekn wojtekn left a comment

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
12 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import fails when using a site with PHP 7
2 participants