WordPress 主题消失

WordPress Themes Disappearing

我在 RunCloud/digital 海洋上有一个 WP multi-site 运行。我尝试了四五个自定义主题,但一两个小时后每个主题都会从我的主题菜单中消失。

今天我尝试了 child 个主题,结果相同。这就是我的 twentytwenty-child/style.css:

/*Theme Name: level up child                                             
*Description: child theme of 2020                            
*Template: twentytwenty                               
*/                                               
@import url("../twentytwenty/style.css");                   

但是一旦我创建了 header.php(只需将 parent header 复制到 child 文件夹中),我的 child 主题就消失了。我已经在 child 的文件夹中添加了一个 functions.php 文件,并添加了以下...

function twentytwenty_child_enqueue_styles() {   
   // Parent theme style handle              
   $parent_style = 'twentytwenty-style';         

    // Enqueue parent and child theme style.css.          
    wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );   
    wp_enqueue_style( 'child_style', get_stylesheet_directory_uri() . '/style.css',  
 array($parent_style), wp_get_theme()->get('Version'));     
};     
add_action( 'wp_enqueue_scripts', 'twentytwenty_child_enqueue_styles' );    

...根据 developer.wordpress.org,将文件夹名称重命名两次(恢复为原始名称),但没有成功。 child 主题不会出现在管理菜单中。

child文件夹(twentytwenty-child/)只有style.css、functions.php和header.php。 multi-site 网络上启用了所有可用的主题,包括 twentytwenty。

我是不是遗漏了什么明显的东西?我是WP主题创作的新手,请原谅我的无知。谢谢!

好的,我想我明白了。 Chris 正在研究它是由 RunCloud 引起的。我将新的子文件夹和文件“chown”到 runcloud:runcloud(匹配现有的主题文件夹和文件所有权),它们又出现了!

作为确认,我还在工作主题文件夹 (twentynineteen) 上 运行 'chown root:root'。该文件夹很快就从 wp-admin 菜单中消失了。

默认主题文件夹的权限和我自己创建的子主题是一样的。因此 RunCloud 必须要求拥有 WordPress 文件才能读取它们。