Giter VIP home page Giter VIP logo

must-use-local's Introduction

Must Use Local

An MU Plugin that makes a few adjustments to make local development friendlier (for me).

Setup

  • Clone this directory into wp-content/mu-plugins/must-use-local/
  • Setup mu-plugins/index.php to load wp-content/mu-plugins/must-use-local/must-use-local.php somehow or copy the mu-autoloader.php file in this plugin to your mu-plugins/ directory.

Adjustments

  • Disable SSL verification locally to avoid any annoying issues with self-signed certs for .test domains.
  • Treat requests to local domains as external so that things like cron actually work.

Authentication

  • Increase session time for authenticated users to 365 days.

Mail

  • Filter PHPMailer so that Mailhog is used to send (and capture) emails locally.

Jetpack

Related Posts

I want to be able to export a production database, set it up locally, and then adjust the display of Jetpack related posts without much hassle.

  • Related posts does not work in development mode, so set that to false.
  • Nothing should think it's in production, so enable staging mode.
  • Except! When retrieving image URLs, Jetpack should think it's in development mode so that it doesn't use Photon.

SSO

When I configure a production database locally, I want to be able to run wp user update 123 --user_pass=password and immediately login to the site.

  • Unhook Jetpack SSO locally so that no attempt to use WordPress.com to sign-in is made.

Debug

  • Adds Xdebug related information to the Server section of the Site Health Info page.

Other tools

Proxy remote images

This gist and this article include a LocalValetDriver.php file that when placed in the project root and configured properly will proxy remote images from a domain when they are not available locally.

I would include this file in the repo, but I can't find an explicit license, so copy it from one of those sources. :)

must-use-local's People

Contributors

jeremyfelt avatar

Stargazers

Sérgio Santos avatar Luís Rodrigues avatar

Watchers

 avatar

must-use-local's Issues

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.