{"id":828,"date":"2024-05-07T11:44:03","date_gmt":"2024-05-07T11:44:03","guid":{"rendered":"https:\/\/kb.shortpixel.com\/docs\/how-do-i-activate-the-api-key-on-a-wordpress-multisite\/"},"modified":"2025-08-27T08:42:19","modified_gmt":"2025-08-27T08:42:19","password":"","slug":"how-do-i-activate-the-api-key-on-a-wordpress-multisite","status":"publish","type":"docs","link":"https:\/\/kb.shortpixel.com\/knowledge-base\/article\/how-do-i-activate-the-api-key-on-a-wordpress-multisite\/","title":{"rendered":"How does ShortPixel Image Optimizer work on multisite?"},"content":{"rendered":"\n<p>A WordPress multisite, as you may know, works <a href=\"https:\/\/www.wpbeginner.com\/glossary\/multisite\/\" target=\"_blank\" rel=\"noopener\">slightly different<\/a> than a regular WordPress site. If you&#8217;d like to use <a href=\"https:\/\/wordpress.org\/plugins\/shortpixel-image-optimiser\/\" target=\"_blank\" rel=\"noopener\">ShortPixel Image Optimizer<\/a> on a multisite, you have two options:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>If not all individual sites should have the plugin installed,\u00a0<strong>install but <\/strong><u style=\"font-weight: bold;\">do not<\/u><strong>\u00a0activate <\/strong>the plugin from the Network Admin screen.\u00a0Then, activate it manually on each individual site of the multisite.<\/li>\n\n\n\n<li>If all individual sites should have the plugin installed, <strong>install <span style=\"text-decoration: underline;\">and<\/span>\u00a0activate <\/strong>the plugin from the Network Admin screen.<\/li>\n<\/ol>\n\n\n\n<p>Once you have done that, the Settings menu appears (Settings &gt; ShortPixel) and you can add the API key for each individual site.<\/p>\n\n\n\n<p>As an alternative, you can edit the <code>wp-config.php<\/code> file and add the following line,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> define('SHORTPIXEL_API_KEY', '&lt;&lt;your api key here>>');<\/pre>\n\n\n\n<p>where <code>&lt;&lt;your api key here>><\/code> is the API key received upon sign up. If configured this way, the API key will be used for <strong>all<\/strong> the individual sites of the multisite but will only be visible on the settings page of the main site, being hidden for the rest of the sites.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A WordPress multisite, as you may know, works slightly different than a regular WordPress site. If you&#8217;d like to use ShortPixel Image Optimizer on a multisite, you have two options: Once you have done that, the Settings menu appears (Settings &gt; ShortPixel) and you can add the API key for each individual site. As an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[37],"glossaries":[],"doc_tag":[],"class_list":["post-828","docs","type-docs","status-publish","hentry","doc_category-shortpixel-image-optimizer"],"blocksy_meta":[],"year_month":"2026-04","word_count":186,"total_views":"722","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"admin","author_nicename":"admin_mdli53m5","author_url":"https:\/\/kb.shortpixel.com\/author\/admin_mdli53m5\/"},"doc_category_info":[{"term_name":"ShortPixel Image Optimizer","term_url":"https:\/\/kb.shortpixel.com\/knowledge-base\/category\/shortpixel-image-optimizer\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/828","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/comments?post=828"}],"version-history":[{"count":3,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/828\/revisions"}],"predecessor-version":[{"id":1571,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/828\/revisions\/1571"}],"wp:attachment":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/media?parent=828"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_category?post=828"},{"taxonomy":"glossaries","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/glossaries?post=828"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_tag?post=828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}