{"id":9619,"date":"2026-06-03T07:34:42","date_gmt":"2026-06-03T05:34:42","guid":{"rendered":"https:\/\/mybox.com\/help\/?post_type=manual_kb&#038;p=9619"},"modified":"2026-06-08T09:23:32","modified_gmt":"2026-06-08T07:23:32","slug":"cum-se-modifica-directorul-implicit-al-pluginurilor-wordpress-folosind-fisierul-wp-config-php","status":"publish","type":"manual_kb","link":"https:\/\/mybox.com\/help\/ro\/knowledgebase\/how-to-change-the-default-wordpress-plugin-directory-using-wp-config-php\/","title":{"rendered":"Cum s\u0103 schimba\u021bi directorul implicit al plugin-urilor WordPress utiliz\u00e2nd wp-config.php"},"content":{"rendered":"<div class=\"translation-block translation-block-merged\">\n<p class=\"wp-block-paragraph\">Because WordPress is one of the most popular content management systems in the world, it is frequently targeted by automated attacks and vulnerability scanners. Many of these tools rely on the default WordPress directory structure when searching for installed plugins.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One way to make automated scanning more difficult is to change the location of the plugin directory. This can be useful when implementing additional security measures or when using security plugins that support custom WordPress paths.<\/p>\n\n\n\n<\/div>\n\n<div id=\"mybox-1290932133\" class=\"mybox-content mybox-entity-placement\"><div class=\"early-access-banner-inpost\">\r\n  <div class=\"banner-left-inpost\">\r\n    <div class=\"icon-box-inpost\">\r\n      <img decoding=\"async\" src=\"https:\/\/mybox.com\/help\/wp-content\/uploads\/2026\/02\/square-info-icon.svg\" alt=\"Info\">\r\n    <\/div>\r\n    <div class=\"text-box-inpost\">\r\n      <span class=\"label-inpost\"><span class=\"translation-block translation-block-banner-text\">Acces timpuriu<\/span><\/span>\r\n      <h4><span class=\"translation-block translation-block-banner-text\">Mai ave\u021bi nevoie de ajutor?<\/span><\/h4>\r\n      <p><span class=\"translation-block translation-block-banner-text\">Contacta\u021bi echipa noastr\u0103 de servicii pentru clien\u021bi.<\/span><\/p>\r\n    <\/div>\r\n  <\/div>\r\n\r\n  <div class=\"banner-right-inpost\">\r\n    <a href=\"https:\/\/panel.mybox.com\/helpdesk2\/v\/list\/\" class=\"banner-button-inpost\"><span class=\"translation-block translation-block-banner-text\">Trimite mesaj<\/span><\/a>\r\n  <\/div>\r\n<\/div><\/div>\n\n<div class=\"translation-block translation-block-merged\"><p class=\"wp-block-paragraph\">You can define a custom plugin directory by adding a configuration directive to the <code>wp-config.php<\/code> file.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Important:<\/strong> Before making any changes, create a backup of your website and the <code>wp-config.php<\/code> file. Incorrect configuration may cause plugins to stop loading properly.<\/p>\n<\/blockquote>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_86 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/mybox.com\/help\/ro\/knowledgebase\/how-to-change-the-default-wordpress-plugin-directory-using-wp-config-php\/#Step_1_Locate_the_wp-configphp_File\" >Step 1: Locate the wp-config.php File<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/mybox.com\/help\/ro\/knowledgebase\/how-to-change-the-default-wordpress-plugin-directory-using-wp-config-php\/#Step_2_Add_a_Custom_Plugin_Directory_Definition\" >Step 2: Add a Custom Plugin Directory Definition<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/mybox.com\/help\/ro\/knowledgebase\/how-to-change-the-default-wordpress-plugin-directory-using-wp-config-php\/#Option_1_Local_Server_Path\" >Option 1: Local Server Path<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/mybox.com\/help\/ro\/knowledgebase\/how-to-change-the-default-wordpress-plugin-directory-using-wp-config-php\/#Option_2_Full_URL_Path\" >Option 2: Full URL Path<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/mybox.com\/help\/ro\/knowledgebase\/how-to-change-the-default-wordpress-plugin-directory-using-wp-config-php\/#Important_Notes\" >Important Notes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/mybox.com\/help\/ro\/knowledgebase\/how-to-change-the-default-wordpress-plugin-directory-using-wp-config-php\/#When_Should_You_Use_a_Custom_Plugin_Directory\" >When Should You Use a Custom Plugin Directory?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/mybox.com\/help\/ro\/knowledgebase\/how-to-change-the-default-wordpress-plugin-directory-using-wp-config-php\/#Verify_the_Configuration\" >Verify the Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/mybox.com\/help\/ro\/knowledgebase\/how-to-change-the-default-wordpress-plugin-directory-using-wp-config-php\/#Summary\" >Summary<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_1_Locate_the_wp-configphp_File\"><\/span>Step 1: Locate the <code>wp-config.php<\/code> File<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Connect to your website via FTP.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Navigate to your WordPress installation directory, typically:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public_html<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Locate the file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp-config.php<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_2_Add_a_Custom_Plugin_Directory_Definition\"><\/span>Step 2: Add a Custom Plugin Directory Definition<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Open the <code>wp-config.php<\/code> file for editing and add one of the following configurations before the line:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/* That's all, stop editing! Happy publishing. *\/<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Option_1_Local_Server_Path\"><\/span>Option 1: Local Server Path<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use this option when defining the plugin directory using the server filesystem path:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define('WP_PLUGIN_DIR', $_SERVER&#91;'DOCUMENT_ROOT'].'\/path\/wp-content\/plugins');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/path\/wp-content\/plugins<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">with the actual path to your custom plugin directory.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Option_2_Full_URL_Path\"><\/span>Option 2: Full URL Path<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use this option when defining the plugin directory using a full URL:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define('WP_PLUGIN_URL', 'https:\/\/yourdomain.com\/path\/wp-content\/plugins');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;yourdomain.com\/path\/wp-content\/plugins<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">with the actual URL of your custom plugin directory.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Important_Notes\"><\/span>Important Notes<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use <strong>one method only<\/strong>. Do not configure both options unless you fully understand the implications.<\/li>\n\n\n\n<li>The directory must exist and be accessible by WordPress.<\/li>\n\n\n\n<li>After changing the plugin location, existing plugins may need to be moved to the new directory.<\/li>\n\n\n\n<li>Some plugins may assume the default WordPress directory structure and may not function correctly with a custom plugin path.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"When_Should_You_Use_a_Custom_Plugin_Directory\"><\/span>When Should You Use a Custom Plugin Directory?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Changing the default plugin directory can be useful when:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Implementing additional WordPress hardening measures<\/li>\n\n\n\n<li>Reducing exposure to automated vulnerability scanners<\/li>\n\n\n\n<li>Using custom deployment workflows<\/li>\n\n\n\n<li>Organizing multiple WordPress installations<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">However, it should not be considered a replacement for proper security practices such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Keeping WordPress updated<\/li>\n\n\n\n<li>Updating themes and plugins regularly<\/li>\n\n\n\n<li>Using strong passwords<\/li>\n\n\n\n<li>Enabling two-factor authentication<\/li>\n\n\n\n<li>Using a Web Application Firewall (WAF)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Verify_the_Configuration\"><\/span>Verify the Configuration<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After saving the changes:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to the WordPress administration panel.<\/li>\n\n\n\n<li>Verify that all plugins load correctly.<\/li>\n\n\n\n<li>Check the website for any errors or missing functionality.<\/li>\n\n\n\n<li>Review the PHP error logs if problems occur.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Summary\"><\/span>Summary<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You can change the default WordPress plugin directory by defining a custom path in the <code>wp-config.php<\/code> file using either:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define('WP_PLUGIN_DIR', $_SERVER&#91;'DOCUMENT_ROOT'].'\/path\/wp-content\/plugins');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define('WP_PLUGIN_URL', 'https:\/\/yourdomain.com\/path\/wp-content\/plugins');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Using a custom plugin directory can provide an additional layer of obscurity against automated scanning tools, but it should always be combined with standard WordPress security best practices.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n<\/div>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"template":"","format":"standard","manualknowledgebasecat":[58],"manual_kb_tag":[429,4969,5102,5103,5104,5105,5106,5107,5108,5109],"class_list":["post-9619","manual_kb","type-manual_kb","status-publish","format-standard","hentry","manualknowledgebasecat-web-applications-cms","manual_kb_tag-wordpress-security","manual_kb_tag-website-backup","manual_kb_tag-custom-plugin-directory","manual_kb_tag-change-default-plugin-directory","manual_kb_tag-wordpress-config-php","manual_kb_tag-plugin-path-configuration","manual_kb_tag-vulnerability-scanners","manual_kb_tag-reduce-automated-scanning","manual_kb_tag-plugin-compatibility-issues","manual_kb_tag-security-hardening"],"_links":{"self":[{"href":"https:\/\/mybox.com\/help\/ro\/wp-json\/wp\/v2\/manual_kb\/9619","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mybox.com\/help\/ro\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/mybox.com\/help\/ro\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/mybox.com\/help\/ro\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":2,"href":"https:\/\/mybox.com\/help\/ro\/wp-json\/wp\/v2\/manual_kb\/9619\/revisions"}],"predecessor-version":[{"id":9620,"href":"https:\/\/mybox.com\/help\/ro\/wp-json\/wp\/v2\/manual_kb\/9619\/revisions\/9620"}],"wp:attachment":[{"href":"https:\/\/mybox.com\/help\/ro\/wp-json\/wp\/v2\/media?parent=9619"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/mybox.com\/help\/ro\/wp-json\/wp\/v2\/manualknowledgebasecat?post=9619"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/mybox.com\/help\/ro\/wp-json\/wp\/v2\/manual_kb_tag?post=9619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}