When attempting to clone a WordPress theme using the new “Create Block Theme” tool, you may encounter the error message: “Warning: require_once(/home/user/Local Sites/dummy-site/app/public/wp-content/themes/dummy-theme/inc/class-dummy-theme-update.php): Failed to open stream: No such file or directory in /home/user/Local Sites/dummy-site/app/public/wp-content/themes/dummy-theme/functions.php on line 71 Fatal error: Uncaught Error: Failed opening required ‘/home/user/Local Sites/dummy-site/app/public/wp-content/themes/dummy-theme/inc/class-dummy-theme-update.php’ (include_path=’.:/usr/share/php:/www/wp-content/pear’) in /home/user/Local Sites/dummy-site/app/public/wp-content/themes/dummy-theme/functions.php:71 Stack trace: 0 /home/user/Local Sites/dummy-site/app/public/wp-settings.php(611): include()1 /home/user/Local Sites/dummy-site/app/public/wp-config.php(96): require_once(‘/home/user/Loc…’)2 /home/user/Local Sites/dummy-site/app/public/wp-load.php(50): require_once(‘/home/user/Loc…’)3 /home/user/Local Sites/dummy-site/app/public/wp-admin/admin.php(34): require_once(‘/home/user/Loc…’)4 /home/user/Local Sites/dummy-site/app/public/wp-admin/themes.php(10): require_once(‘/home/user/Loc…’) {main} thrown in /home/user/Local Sites/dummy-site/app/public/wp-content/themes/dummy-theme/functions.php on line 71″This error indicates that the file <code class=””>class-dummy-theme-update.php is missing from the theme’s directory. This file contains important functionality for the theme, and its absence is causing the error. To fix this issue, you can follow these steps:
After following these steps, you should be able to successfully create the block theme without encountering the error message. My comment: I deleted the functions.php file after I copied its content. I added this content to a new php file called class-dummy-theme-update.php and everything is working now. Two things need to be mentioned: |