Ubuntu 20.04 focal fossa | Ubuntu 22.04 jammy jellyfish | |
WordPress 6 | ✅ | ✅ |
Follow the guide on single site installation then continue here.
Change wp-config.php, add
define( 'WP_ALLOW_MULTISITE', true );
Go back to WordPress in browser and refresh. Under Tools should see Network Setup.


Add this text to wp-config.php
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', false );
define( 'DOMAIN_CURRENT_SITE', '43.218.221.177' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
If you want to use SUBDOMAIN_INSTALL (different domains e.g. one.com, two.com, three.com), then set SUBDOMAIN_INSTALL to true.
Replace what is in /var/www/html/.htaccess with this.
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
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]
Relogin and refresh the browser. You should now be able to see My Sites and add new sites.

