how i can adding Structured data JSON-LD to multisite in drupal 7

how i can add rich snippets(Structured data JSON-LD) to multisite in drupal7 ??

example JSON-LD:

<script type="application/ld+json">    {"@context": "https://schema.org",        "@type": "Organization",        "url": "http://www.example.com",      "name": "Unlimited Ball Bearings Corp.",       "contactPoint": {     "@type": "ContactPoint",     "telephone": "+1-401-555-1212",     "contactType": "Customer service"   } }   </script> 

Multisite configuration with multiple domains and subdomains

Im using cpanel and drupal 7.

In CPanel I have created 2 domains and pointed to my drupal installation. In the drupal sites folder I have added a folder for each domain and added the settings file.

When I navigate to either of the 2 domains I get the seperate drupal installs.

I am now trying to add subdomains of each of the sites. I create the subdomains in CPanel, point them to the drupal install. Added the subdomain folders with the settings files. But when I navigate to the subdomains I get a page not found error.

For clarity the below will help to illustrate my set up.

example.com uses sites/default example1.com uses sites/example1.com example2.com uses sites/example2.com The above is working.

subdomain.example1.com should use sites/subdomain.example1.com and subdomain.example2.com should use sites/subdomain.example2.com but these 2 subdomains do not resolve.

How do I correctly set up these subdomains?

Thank you for any help.

Get proper category url for Multisite

I have created a category for each website so one root category for website 1 and another root category for website 2. Now website 1 is set to a domain url of https://website1.com and this is the base url. The admin panel is set to https://website1.com/admin. Now I have another store that is proxy pass and having a url of https://website2.com. Note website2 and website1 is the same code base and I just setup a multisite here. Now when checking the generated url for website2 it’s returning the domain of website1.

I used a simulator for the store but it’s not working. Now I want to know how to get the proper url specially for multisite feature. Would appreciate any help please

WordPress Multisite query parameters

Am currently having an issue with the redirection of query parameters on a multisite. I have embedded an Angular App inside an iframe and have a script to assign the query parameters of the app to the host page (deeplinking). The issue here is, the WP multisite redirects the assigned iframe query parameters to host page back to the main embed app page instead and hence, users are forced to restart their in-app journey. Could this be related to multisite .htaccess or nginx rewrite rules? Any advice is much appreciated.

How to set and use direct files folder path in a multisite installation

Drupal 8 multisite install where

  1. First site is on a subdomain one.example.com
  2. Second site is in a subfolder one.example.com/two

How can files folder for both sites to be accessible via URL/files and not URL/sites/domain/files

  • current: one.example.com/sites/one.example.com/files
  • desired: one.example.com/files
  • current: one.example.com/two/sites/two/files
  • desired: one.example.com/two/files

I tried several variants listed here https://www.drupal.org/node/53705 and put them at following locations, but nothing worked.

  1. Drupal8/.htaccess
  2. Drupal8/files/.htaccess
  3. Drupal8/sites/two/files/.htaccess

Setup information is provided below


Filesystem setup

--Drupal8   --index.php   --one.example.com (sym link ln -s . one.example.com)   --two (sym link ln -s . two) Not required in D8, but could not get the subfolder site to work without it.   --sites     --default (sym links to one.example.com)     --one.example.com       --settings.php, services.yml       --files, modules,etc     --two       --settings.php, services.yml       --files, modules,etc 

Sites.php

$  sites = []; $  sites['one.example.com'] = 'one.example.com'; $  sites['one.example.com.two'] = 'two'; 

Apache setup : One virtual host for one.example.com

Can I still share data tables with multisite, using shared database, in Drupal 8 or do I need to use ‘Domains’ contrib module?

I have a multi-site setup that is working in Drupal 8 (8.6.13) – all of the sites share the code-base and database happily but I cannot seem to share data tables between the sites using the prefix array method – has this changed in Drupal 8 since older versions?

… I start off asking this since most of the data I am finding is for Drupal 7 or older and the solutions given seem valid but are not fully working when I try to implement them.

For example – I want a base (default) site to handle taxonomy, content types, and some admin functions like REST APIs. Each site can handle it’s own content and theme (there are no users to worry about) and the sites/multi-site-1/settings.php is configured to handle this properly (I think).

in the base settings.php:

$  databases['default']['default'] = array(   'database' => 'base_database',   'username' => 'db_user',   'password' => 'db_password',   'prefix' => array(     'default'             => 'base_', // ** content type and fields seem to share okay!     'content_type_' => 'shared_',     'content_field_' => 'shared_',  // ** the other tables with 'shared_' prefix that do not work shown below 

and in the sites/multi-site-1/settings.php:

$  databases['default']['default'] = array (   'database' => 'base_database',   'username' => 'db_user',   'password' => 'db_password',   'prefix' => array(     'default'         => 'site_1_',  // ** can these even be shared?     // 'config'              => 'shared_',     // 'config_snapshot'     => 'shared_',  // ** users related things have errors when installing multi-site-1     //'authmap' => 'shared_',     //'profile_fields' => 'shared_',     //'profile_values' => 'shared_',     //'permission' => 'shared_',     //'role' => 'shared_',     //'sessions' => 'shared_',    //1. error - if sharing site won't even start install     //'user' => 'shared_',        //3. error - "EntityStorageException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY': "     //'users' => 'shared_',     //'users_roles' => 'shared_', //2. error - "The "user_role" entity type does not exist."      //'users_data' => 'shared_',  //2. error - "Table users_data already exists"     //'users_field_data' => 'shared_',  // ** taxonomy related share seems okay but not working?     //'taxonomy_index' => 'shared_',     //'taxonomy_term_data' => 'shared_',     //'taxonomy_term_field_data' => 'shared_',     //'taxonomy_term__parent' => 'shared_',      //'vocabulary' => 'shared_',       // 1. install error - not present in D8 db?     //'vocabulary_node_types' => 'shared_',      //'term_data' => 'shared_', // not present in D8?     //'term_hierarchy' => 'shared_', // not present in D8?     //'term_image' => 'shared_', // not present - n/a?     //'term_lineage' => 'shared_', // not present - n/a?     //'term_node' => 'shared_', // not present - n/a?     //'term_relation' => 'shared_', // not present - n/a?     //'term_synonym' => 'shared_', // not present - n/a?   ),   'host' => 'localhost',   'port' => '3306',   'namespace' => 'Drupal\Core\Database\Driver\mysql',   'driver' => 'mysql',   'collation' => 'utf8mb4_unicode_ci', ); 
  1. Should I abandon the multi-site config in this manner and rely on a contrib module like Domain Access? (I have tried to set this up but cannot seem to get it configured properly – or am not even sure what it is supposed to be doing for me).
  2. Is this still a good way to share data in the database in Drupal 8 or am I missing something?
  3. Am I adding in too much of the old v7 and v6 multi-site logic and Drupal 8 handles this differently?

any insights into how to do this better would be greatly appreciated!


some answers already read and referenced:

  • How to share user and user profile in a multisite environment?
  • How do I create a multisite with shared users and nodes?
  • Deprecate multisite in 8.x for removal in 9.x
  • and of course from Drupal.org => Share tables across instances (not recommended)

After disabling Multisite, homepage redirects to non-existing page

I disabled Multisite. Deleted all wp-config lines, updated .htaccess with the default code and deleted all MySQL entries.

Now my homepage – pitch.pt – keeps redirecting to pitch.pt/home2.

All other pages, posts and dashboard are working fine.

I went on phpMyAdmin and found that on wp_options the URLs were set to home2, but already fixed that.

I’ve disabled plugins, verified wp-config and updated permalinks.

Drupal multi-site install on command line using Drush

In Order to install Drupal Core using Code deploy, I follow the following steps –

  1. Download drupal-7.x.zip
  2. /usr/bin/unzip -o /tmp/drupal.zip /bin/mv /var/www/drupal-7.x /var/www/drupal
  3. Similar steps to download and unzip the modules / themes etc
  4. Next is deployment of configurations under folder sites/, and restart apache

My question is – do we need any Drush init steps in this scenario? and How do we upgrade using Drush commands only?

Thank you!