php 允许从实时拉出(WP Migrate DB Pro)而不在本地激活不需要的插件

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 允许从实时拉出(WP Migrate DB Pro)而不在本地激活不需要的插件相关的知识,希望对你有一定的参考价值。

<?php
/*
Plugin Name: Deactivate Plugins in Development
Plugin URI: https://gist.github.com/heyfletch/07a3677f69f94a02aaa02621075e5d6e
Description: Create a list of plugins to deactivate on local development. Doesn't effect production plugins. 
Author: Fletcher Digital
Version: 0.1
Author URI: https://fletcherdigital.com
*/

/* Disable specified plugins in development environment */
if (defined('WP_ENV') && WP_ENV == 'development') {

  $plugins = array(

    'autoptimize/autoptimize.php',
    'cloudflare/cloudflare.php',
    'google-analytics-for-wordpress/googleanalytics.php',
    'limit-login-attempts-reloaded/limit-login-attempts-reloaded.php',

  );

  require_once(ABSPATH . 'wp-admin/includes/plugin.php');

  deactivate_plugins($plugins);

}

以上是关于php 允许从实时拉出(WP Migrate DB Pro)而不在本地激活不需要的插件的主要内容,如果未能解决你的问题,请参考以下文章

php functions.php - 删除JQuery / Migrate和WP Embed

sql 按https://deliciousbrains.com/wp-migrate-db-pro/doc/extracting-subsite-multisite-create-new-singl

sql 按https://deliciousbrains.com/wp-migrate-db-pro/doc/extracting-subsite-multisite-create-new-singl

sql 按https://deliciousbrains.com/wp-migrate-db-pro/doc/extracting-subsite-multisite-create-new-singl

无法将 WordPress 备份从实时安装到本地

致命错误:wp-db.php 的最大执行时间超过了 60 秒