php - Wordpress Multisite with localhost and 8090 port

296

Problem

Im trying to setup a local working sub domainWordpress multisite on the port8090.

Setup

  • MAMP Stack with SQL on port 3306, Apache on 8080.
  • Wordpress 4.4 installed on path: /Users/x/y/website/www/wordpress
  • Running PHP Webserver in IntelliJ on port 8090.

Error (when trying to install multisite network in the admin wordpress section)

Error: You cannot install a network of sites with your server address

You cannot use port numbers such as :8090.

Therefore I changed my apache2 httpd.config file.

httpd.config

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

and added virtual hosts

httpd-vhosts.conf

NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "/Users/x/Environment/mampstack-5.4.32-0/
apache2/htdocs"
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "/Users/x/y/website/www"
ServerName testproject.dev
<Directory "/Users/x/y/website/www">
    AllowOverride All
</Directory>
</VirtualHost>

Then I changed the /etc/host.

/etc/host

127.0.0.1 localhost testproject.dev

# later on for mulisite sub domains
127.0.0.1 localhost.com
127.0.0.1 subdomain.localhost.com

I restarted the whole MAMP setup, flushed the cache for the htaccess file and restarted my php server. But I still got the same error and cant setup my multisite in Wordpress.

Question

What am I doing wrong?

107

Answer

Solution:

You cannot create a network in the following cases:

  • "WordPress address (URL)" is different from "Site address (URL)".
  • "WordPress address (URL)" uses a port number other than ':80', ':443'.

Change your port to 80 for wordpress multisites is a simple solution.

People are also looking for solutions to the problem: php - Cannot set object value with merge value

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.