Notice: wp_register_script was called <strong>incorrectly</strong>

windows

#21

Sent. Many thanks again!
I’ve sent the basic backup without uploads, so the file is down to 46MB! It will probably need the Wordpress to be updated. I left it out in case I made a mistake in that step.


#22

Sorry, I couldn’t get past an error about not having the PHP configured for MySQL.


#23

I think that gets fixed when Wordpress is updated.


#24

Hey @Turnspike and @afragen

The Local log definitely is pointing to something going wrong with MySQL.

Just to rule out that everything else about Local is working correctly – @Turnspike – can you create a new, custom site with the various settings that you want to use when importing the site. It looks like maybe PHP5.6 and MySQL 5.6 is what was being used for at least one of those sites. Hopefully, that will verify that Local is able to create a new, blank site.

Additional places that I would look to get more information would be:

  • Review the logs folder within the Local sites folder. Is there any information in logs/php/error.log or logs/mysql/error.log?
  • Can you open the original backup and review the wp-config.php file? There might be additional configuration options that were put in that file at the old host. Compare that with the wp-config.php file that is generated by the above “vanilla” site. It’s possible that a plugin is relying on some setting and is crashing on both the front-end and the back-end.

Let me know what you find in those places. Feel free to zip up the logs folder and I can take a look as well!

– Ben


#25

This is what I did to get the site to where it was when I made this thread (quoted from a different thread):


#26

My log file: local-by-flywheel.log (231.4 KB)


#27

PHP error file: error.log (37.2 KB)


#28

MySQL error file error.log (40.4 KB)


#29

Just created a blank site with Local and am only getting 503 errors.
There is an update available now, I will download that and see if that helps.


#30

Compared the two wp-config files.

The only difference I can see that I think may be an issue could be that my site has this, while the new one doesn’t.

/**

  • WordPress Localized Language, defaults to English.
  • Change this to localize WordPress. A corresponding MO file for the chosen
  • language must be installed to wp-content/languages. For example, install
  • de.mo to wp-content/languages and set WPLANG to ‘de’ to enable German
  • language support.
    */
    define (‘WPLANG’, ‘’);

/**

  • For developers: WordPress debugging mode.
  • Change this to true to enable the display of notices during development.
  • It is strongly recommended that plugin and theme developers use WP_DEBUG
  • in their development environments.
    */
    define(‘WP_DEBUG’, true);

/**

  • Change this to true to run multiple blogs on this installation.
  • Then login as admin and go to Tools -> Network
    */
    define(‘WP_ALLOW_MULTISITE’, true);

/* That’s all, stop editing! Happy blogging. */

/** Absolute path to the WordPress directory. */
if ( !defined(‘ABSPATH’) )
define(‘ABSPATH’, dirname(FILE) . ‘/’);

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . ‘wp-settings.php’);
define( ‘WP_HOME’, ‘C:\Users\Lewis\Local Sites\cracking-ace-local’ ); define( ‘WP_SITEURL’, ‘C:\Users\Lewis\Local Sites\cracking-ace-local’ );


#31

It could be something else, but then I’m not a behind the scenes expert at all. I just like to have software that I can use.

Thanks for looking.


#32


#33

Hey @Turnspike – Thanks for those logs!

I think what is happening is that something is crashing MySQL during the import process, and then when Local tries to use wpcli to do various configuration updates, it is unable to because MySQL is offline.

I can’t say for sure the exact thing that is crashing, but I do notice these lines in the Local log:

Jan 26, 2019, 2:44 PM GMT - warn: [ImporterGeneric] /app/sql/web160-a-wor-387.sql result
{ stderr:
   'ERROR 1062 (23000) at line 1072 in file: \'/app/sql/web160-a-wor-387.sql\': Duplicate entry \'\\x00\\xEF\\xBF\\xBD\\xEF\\xBF\\xBD\\xEF\\xBF\\xBD\\xEF\\xBF\\xBD\\xEF\\xBF\\xBD\' for key \'PRIMARY\'' }

I’ve often seen MySQL crash with that Duplicate entry error when migrating sites that have Wordfence tables in the database. It basically has to do with the primary key of those tables being a binary blob of data which is fine inside the database, but when it’s exported and then re-imported on the target machine, it causes errors. Wordfence has this help doc for more info: https://www.wordfence.com/help/advanced/remove-or-reset/

But basically to overcome that error, you’ll need to remove those tables. In a SQL dump you can find and delete any sql statements that relate to the *_wf* tables.

Given that there are error dialogs regarding VirtualBox as well, I would recommend trying the following to get this site setup successfully:

  1. Backup any working Local sites by right-clicking and selecting “Export”
  2. Ensure that you have backed up the files for any sites that aren’t working
  3. Completely uninstall Local using these instructions: Uninstall VB for Windows
  4. Re-install Local and verify that you can create new, plain WordPress sites

From here, Local should be working correctly, if it isn’t then there is something deeper going wrong that needs to be addressed. If Local seems to be working, then you can turn your attention to getting the site setup. Give a try and dragging and dropping the backup to import it, but from the wp-config.php differences, it looks like it may be a multisite installation, which will likely be more difficult to fix.

You might want to review this forum post: Multisite Migration Live to Local for more info on migrating a multisite to Local.

Let me know how resetting Local works, and if you are able to create new, plain WordPress sites. Also let me know what you find out when trying to import the site into the reset setup of Local.

– Ben


#34

Ok. Reinstalled Local. I was able to create a new blank site, so that’s nice.
It’s quite slow. That may be due to my machine, and perhaps that is having an effect on my large imported sites too?


#35

Still need to look into the Wordfence problems etc. As I say I’m not much of a techie, but these step by step instructions will hopefully do the trick.I just hope they work!


#36

Since there are so many issues with this import could I do this as an alternative?

Use the newly created site and copy and paste the old blog posts into it.

How do I do this?

I’m not too concerned about plugins. If I need them perhaps I can re-add them to the fresh site. My main concern is that I want my articles available. I’m not too fussed about flashy plugins. I think most were for social stuff anyway which will be useless on my local install.


#37

Now the new clean site is giving this error:

Service Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.


#38

After a few attempts it let me in. I guess something hadn’t loaded properly yet.


#39

How do I do an SQL dump?


#40

Going a bit mad with this. I’ve deleted everything I can find related to Wordfence. Still getting a white blank page.

Adding the database to the fresh install gave the same result.

Could Bulletproof Security also be an issue?