LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   have a great new year - stay healthy and safe! (https://www.linuxquestions.org/questions/general-10/have-a-great-new-year-stay-healthy-and-safe-4175687801/)

rincon 12-31-2020 09:33 PM

have a great new year - stay healthy and safe!
 
hello linux experts



hope youre all right and everything goes well in your home-town. Have a happy new year - and stay healthy.*

have a happy new year.*


ever wanted to work with WordPress multisite, but if so - you wanted to be able to use your own names. For example your main site is named example.com.*
If you want to add a new site to your multisite network it's gonna be called newsite.example.com: Suppose you want to be able to visit newsite.com without example.*

good news: there is a way to achieve this?

first steps to achieve this:*
setup: https://codex.wordpress.org/Installing_WordPress
configuring: https://codex.wordpress.org/Create_A_Network

we have to configure the DNS Records (Nameservers) for the Custom Domain:

some steps to do so:*
a. *we need to make sure that our custom domain name points to our hosting server.
b. *for the setup of different domain and hosting accounts (recommendet), we to repeat the steps to set up the networkís main domain name (i.e. the primary domain on which we ve installed WordPress).

it is pretty important that we configure the custom domainís DNS records manually.*
Note: There is no special single catch-all process, since the method will depend on which domain registrar hosting provider we are going to use.

here is a sample configuration for the wp-config.php file in the base directory of the WordPress installation:

Code:

/* Multisite */
define( 'WP_ALLOW_MULTISITE', true );
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', true );
define( 'DOMAIN_CURRENT_SITE', 'www.primary-domain.com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );

here's the basic configuration for the .htaccess file as a subdomain configuration, *in the base directory of the WordPress installation:

Code:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

# BoF WordPress cf: https://gist.github.com/domantasg/c6...3e5797a89e738f

# EoF WordPress
.....to get TLD's to work properly, *we can do some additional configurations to the wp-config.php file like the following.,..

Code:

define( 'COOKIE_DOMAIN', '' );
define( 'ADMIN_COOKIE_PATH', '/' );
define( 'COOKIEPATH', '/' );
define( 'SITECOOKIEPATH', '/' );

cf: *https://wordpress.stackexchange.com/...t-domain-names

best practice:

- one Apache Virtual Host for the primary domain in the network and then*
- configure that virtual host with alias domains. Each alias domain being one of the additional sites in the network.

links for more infos:

https://wordpress.org/support/articl...dministration/
https://wordpress.org/support/article/create-a-network/
https://www.wpbeginner.com/wp-tutori...isite-network/
https://gist.github.com/domantasg/c6...3e5797a89e738f
https://kinsta.com/de/wissensdatenba...omain-mapping/
https://herothemes.com/blog/wordpres...mapping-guide/
https://premium.wpmudev.org/blog/dom...ess-multisite/
https://wordpress.stackexchange.com/...t-domain-names[/quote]

TorC 01-01-2021 12:58 AM

Happy New Year!

JSB 01-02-2021 07:12 AM

Happy New Year to everybody!
I hope this year will not be a Covid year.


All times are GMT -5. The time now is 02:50 AM.