Giter Club home page Giter Club logo

wordpress-website-lifecycle's Introduction

WordPress website lifecycle

Tweet

How to work with WordPress. ๐Ÿ’ก #active-development #self-hosted #long-term #monitoring

We run WordPress on Debian GNU/Linux operating system which runs on an UpCloud cloud instance.

Division of labour

Who does what.

  1. Editor manages the content and related settings.
  2. Developer commits plugin and theme source code to GitHub and initiates deployment (CI/CD).
  3. Viktor manages the operating system, webserver software, WordPress core, plugins, the theme, privileged users, system settings, security, backup and migrations.

There is no web-based administration. WordPress installation is managed with git, Composer and WP-CLI on the command-line.

More than the famous 5-minute installation

Our WordPress installation includes preparations for the next few error-free years.

These preparations are implemented in MU plugins.

Support my work

Please consider sponsoring me monthly if you use my packages in an agency.

Sponsor

They are already sponsoring me.

johnbillionย ย  JJJย ย  montchrย ย  blockifywpย ย 

Working in a git repository

Our WordPress installation is stored in a git repository and managed with Composer.

This is the starter template. szepeviktor/composer-managed-wordpress

Custom plugins and themes live in separate git repositories.

Purchased themes should have an active child theme.

wp plugin install child-theme-configurator --activate

Keep the child theme in a git repository also.

Onboarding for developers

Let's prevent working against each other!

  • Don't write code changing WordPress core behavior anywhere else than MU plugins,
    • removing admin menus, admin bar elements
    • disabling emojis
    • disabling comments
    • disabling feeds
    • disabling embeds
    • mail settings and logging
    • WAF: authentication/login, HTTP and REST API security
    • comment form and contact form spam traps
    • media management
    • nav menu, translation and content caching
    • HTTP and HTML optimization
    • CDN support
  • Plugin update check HTTP requests and updates itself are disabled because the whole WordPress installation is managed with Composer
  • Plugin and theme update and WordPress management-related admin pages are removed (updated with Composer, administered with WP-CLI)
  • WP-Cron is ran by a Linux cron job (the default pseudo cron/web callback is disabled)
  • Only things necessary for generating custom admin pages and generating HTML go into the theme
  • Business logic (e.g. processing input from visitors) goes into plugins
  • Please adhere to a coding standard of your choice
  • Please avoid discouraged functions
  • We run static analysis on all source code
  • PSR-4 autoloading is suggested (no need for require and custom class autoloading)
  • WordPress core is installed in a separate subdirectory
  • Please also see hosting information for developers

High level overview

๐Ÿ’ก

Installation materials

Theme review

Development stuff

Testing

wordpress-website-lifecycle's People

Contributors

szepeviktor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wordpress-website-lifecycle's Issues

Disable Full Site Editing - `wp_render_duotone_support`

Is this part of one of the hooks already removed in https://github.com/szepeviktor/wordpress-website-lifecycle/blob/master/mu-plugins/_core-fse.php?
Should this be added to _core-fse.php?

remove_filter('render_block', 'wp_render_duotone_support', 10, 2);

@johnbillion Could you land me a hand in this tiny matter?
Is the above hook part of one of the hooks removed in _core-fse.php?

remove_action('wp_enqueue_scripts', 'wp_enqueue_global_styles');
remove_action('wp_footer', 'wp_enqueue_global_styles', 1);
remove_action('wp_body_open', 'wp_global_styles_render_svg_filters');

Core's view on plugin life-cycle

  • getting the ZIP file, extracting files wp plugin install
  • โš ๏ธ Note the missing install event
  • activating (enable running) wp plugin activate register_activation_hook()
  • updating (getting the new ZIP, replacing files) wp plugin update upgrader_process_complete running in with the old verison
  • deactivating (stop running) wp plugin deactivate register_deactivation_hook()
  • uninstalling wp plugin uninstall register_uninstall_hook()
  • deleting files wp plugin delete

Architecture of WooCommerce (flow of execution)

Trim down WC, "WooCommerce lite"

  • Load WooCommerce class from a modified copy of includes/class-woocommerce.php
  • replace __FILE__ with dirname(WC_PLUGIN_FILE).'/includes/class-woocommerce.php'
  • compare class version to plugin version during deployment
    version_compare(\WooCommerce::instance()->version, \Composer\InstalledVersions::getVersion('wpackagist-plugin/woocommerce'), '=');
  • WC Features: src/Internal/Features/FeaturesController.php
  • WC Admin features: filter:woocommerce_admin_features includes/react-admin/feature-config.php
  • WC Blocks: src/Packages.php
  • wget https://github.com/woocommerce/woocommerce/releases/download/7.6.1/woocommerce.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.