Coder Social home page Coder Social logo

dougwollison / domainer Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 3.0 276 KB

Domain management for WordPress multisite installs

Home Page: https://wordpress.org/plugins/domainer/

License: GNU General Public License v3.0

PHP 97.08% JavaScript 2.12% SCSS 0.79%

domainer's Introduction

=== Domainer ===
Contributors: dougwollison
Tags: domain mapping, domain management, multisite
Requires at least: 4.0
Tested up to: 5.4.2
Stable tag: 1.2.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Domain mapping management for WordPress Multisite.

== Description ==

Domainer lets you route custom domain names to specific sites on your Multisite installation. That's it.

= Domain Options =

Each domain has 4 options you set:

1. The target site; pick from a list of existing sites on your network.
2. A type, choose from one of 3 flavours:
	- *Primary*: sites with a primary domain will have their URLs redirected to them.
	- *Redirect*: these domains will always redirect to the primary domain, or the original failing that.
	- *Alias*: these won't redirect to the primary, so they're bad for SEO but can be useful for certain setups.
3. A www rule, choose from one of 3 options:
	- *Always*: always redirect to the domain with www at the front.
	- *Never*: always redirect to the domain without www at the front.
	- *Auto*: allow the domain to function with or without www, usually bad for SEO.

= Content Rewriting =

In order to reduce redirects while navigating the site, Domainer will replaced all instances of the site's original domain name on the pages to that of the primary domain, or currently requested alias domain. This will not affect email addresses however; any filters on the content will only replace instances starting with a double slash so as to match URLs.

If you find instances of the domain not being replaced, such as in content filtered by 3rd party plugins, you can patch it with this function:

	add_filter( 'my_filter', 'domainer_rewrite_url' );

The function can also take a domain or array of domains to replace, as well as a specific domain to replace with.

== Installation ==

1. Upload the contents of `domainer.tar.gz` to your `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Assuming the system is unable to take care of it automatically:
	1. Copy the sunrise.php file to `/wp-content/`.
	2. Add `define('SUNRISE', true);` to your `wp-config.php` file, anywhere above the `ABSPATH` line.
4. Start adding domains under Network Admin > Domains.

== Changelog ==

**Details on each release can be found [on the GitHub releases page](https://github.com/dougwollison/domainer/releases) for this project.**

= 1.2.1 =
Improved UX and error handling of Sunrise install process.

= 1.2.0 =
Network Only now. Fixed session handling that was causing loopback requests to fail.

= 1.1.3.1 =
Fixed subdirectory rewrites, ironed out install process.

= 1.1.2 =
Fixed rewrite handling on subdirectory style network setups.

= 1.1.1 =
Fixed handling of alias domains, improved security of remote login/logout.

= 1.1.0 =
Remote login capabilities, blog switching and site selecting fixes.

= 1.0.1 =
Fixed bug with deleting domains and certain redirect URLs.

= 1.0.0 =
Initial public release.

domainer's People

Contributors

dougwollison avatar fvdm avatar ptibogxiv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

domainer's Issues

Sort site names alphabetically

I have a Wordpress multisite and it has more than 100 sites.
And when I try to find the specific sites to a domain, I can't find proper sites.
Screenshot_1
I checked the code and found this snippet under includes/class-domainer-manager.php
static function setup_domain_fields() {
$sites = get_sites( array(
'number' => 0, // unlimited
) );
As get_sites doesn't provide an option to order by blogtitle, we might need to write custom code after we get the $sites value

Do you have any plan to sort by title?

domainer refuses to delete

Hi, great plugin, but we decided to no longer use different domains for our translated pages. Trying to delete Domainer now, but i get an error: "Deletion failed: There has been a critical error on your website.Learn more about debugging in WordPress."

Any suggestions for how to solve this?

Remote login doesn't work

Hi, I'm running into a problem with a multisite WP and Remote Login enabled.

The idea is that a user only logs in once on one of the sites and then is automatically logged in to all the sites they have access to. The login to the targeted site works fine and I get the message that login to the other site was successful too. But when I go to that site I have to login again.

Do you have an idea what may be the problem?

I can provide you access if you wish to take a look.

The setup:

  • Clean WP 5.2.3 multisite install
  • Domainer is the only plugin
  • For the test only two sites: wptest1.domain.tld (main) and wptest2.otherdomain.tld
  • Each site has their own domain name and is correctly mapped in the plugin
  • The header X-Content-Type-Options "nosniff" is disabled
  • The debug/php logs and the browser console log don't report any errors.

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.