Some users have reported facing the Invalid User Action error after migrating their website to a new server or pushing their site from staging to live. In this case you can’t access your dashboard or view your website.
To solve this error:
- Login to your server using FTP/SFTP.
- Navigate to the wp-content folder > themes > child theme folder (the folder will be the name of your child theme) > open/edit or download functions.php and remove the following line:
<?php if( file_exists( get_stylesheet_directory().'/jedi-apprentice/jedi-apprentice-import.php' ) && !defined('JEDI_APPRENTICE_PATH') ) {include_once( get_stylesheet_directory().'/jedi-apprentice/jedi-apprentice-import.php' );} ?>
Please be careful not to remove the next opening php tag or your website will not load correctly.
- Save your changes and re-upload the file.
Note: If you regularly push changes from staging to your live site and vice versa, you can remove this line from your staging and live site. These lines are only required while importing your demo data so you can safely remove them after that.