-
Notifications
You must be signed in to change notification settings - Fork 75
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
Migrating existing Wordpress website #141
Comments
I recommend you disable the plugin psn-pagespeed-ninja using the WordPress cli or a SQL client. If possible you can also provide the query rewrite logs from pg4wp so that we can add this failing query to the test suite. I understand the shape of the rewritten query is something like WHERE i.indrelid = ''::regclass but we need the full unmodified mysql query and what the plugin transforms it to + what postgres expects |
FWIW in case someone else comes across this in the future you can migrate your data like this, we can add something to the readme... Add the postgresql yum repo
|
Thanks for the tip. pgloader version "3.6.70f3557" Database error 42703: column ""ID"" of relation "wp_posts" does not exist PERFORM pg_notify('seqs', n::text); |
Quick update. I used pg_loader with the option --with "reset no sequences" and I could load the database while using --with "quote identifiers" It may be necessary to adjust the sequences values manually, but Ok. |
After migrating the data using pgloader --with "quote identifiers", still having errors:
|
Set PG4WP_DEBUG to true in wp-config and then check the pg4wp directory after recreating the error. You should see a number of log files We need the query + rewrite that caused the failure which seems to be related to the theme _register_theme_block_patterns() |
Thank you. |
I have an existing wordpress website running on WP 6.7.1 connected to MySQL.
I already migrated mysql data to a Postgres 16 instance.
I installed PG4WP and configured everything, but my website is still not working. I did the same procedure with a fresh wordpress installation and it worked perfectly. I understand the PG4WP was designed to work in a new wordpress installation from the beggining, but for me it would be important to convert my current website from MySQL to Postgres. Is there a procedure for that?
Thank you.
The error Iam facing now:
[30-Dec-2024 13:48:22 UTC] PHP Warning: Undefined array key 1 in /mnt/efs/wordpress/siteconfirmemais/wp-content/pg4wp/driver_pgsql.php on line 551
[30-Dec-2024 13:48:22 UTC] PHP Warning: pg_query(): Query failed: ERROR: invalid name syntax
LINE 4: WHERE i.indrelid = ''::regclass
^ in /mnt/efs/wordpress/siteconfirmemais/wp-content/pg4wp/driver_pgsql.php on line 478
[30-Dec-2024 13:48:22 UTC] PHP Fatal error: Uncaught TypeError: pg_fetch_assoc(): Argument #1 ($result) must be of type PgSql\Result, false given in /mnt/efs/wordpress/siteconfirmemais/wp-content/pg4wp/driver_pgsql.php:555
Stack trace:
#0 /mnt/efs/wordpress/siteconfirmemais/wp-content/pg4wp/driver_pgsql.php(555): pg_fetch_assoc()
#1 /mnt/efs/wordpress/siteconfirmemais/wp-content/pg4wp/core.php(34) : eval()'d code(2345): wpsqli_query()
#2 /mnt/efs/wordpress/siteconfirmemais/wp-content/pg4wp/core.php(34) : eval()'d code(2259): wpdb2->_do_query()
#3 /mnt/efs/wordpress/siteconfirmemais/wp-content/plugins/psn-pagespeed-ninja/public/class-pagespeedninja-public.php(349): wpdb2->query()
#4 /mnt/efs/wordpress/siteconfirmemais/wp-content/plugins/psn-pagespeed-ninja/ress/classes/dispatcher.php(111): PagespeedNinja_Public->onRunAfter()
#5 /mnt/efs/wordpress/siteconfirmemais/wp-content/plugins/psn-pagespeed-ninja/ress/ressio.php(289): Ressio_Dispatcher->triggerEvent()
#6 /mnt/efs/wordpress/siteconfirmemais/wp-content/plugins/psn-pagespeed-ninja/public/class-pagespeedninja-public.php(300): Ressio->run()
#7 [internal function]: PagespeedNinja_Public->ob_callback()
#8 /mnt/efs/wordpress/siteconfirmemais/wp-includes/functions.php(5464): ob_end_flush()
#9 /mnt/efs/wordpress/siteconfirmemais/wp-includes/class-wp-hook.php(324): wp_ob_end_flush_all()
#10 /mnt/efs/wordpress/siteconfirmemais/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#11 /mnt/efs/wordpress/siteconfirmemais/wp-includes/plugin.php(517): WP_Hook->do_action()
#12 /mnt/efs/wordpress/siteconfirmemais/wp-includes/load.php(1279): do_action()
#13 [internal function]: shutdown_action_hook()
#14 {main}
thrown in /mnt/efs/wordpress/siteconfirmemais/wp-content/pg4wp/driver_pgsql.php on line 555
The text was updated successfully, but these errors were encountered: