{"id":383,"date":"2014-02-03T15:36:53","date_gmt":"2014-02-03T15:36:53","guid":{"rendered":"http:\/\/www.webmastersun.com\/blog\/?p=383"},"modified":"2014-02-10T14:03:35","modified_gmt":"2014-02-10T14:03:35","slug":"how-to-change-wordpress-wp-admin-url","status":"publish","type":"post","link":"https:\/\/www.webmastersun.com\/blog\/how-to-change-wordpress-wp-admin-url\/","title":{"rendered":"How to change WordPress WP-Admin URL"},"content":{"rendered":"<p><strong>Step 1<\/strong>. Finding file wp-config.php in your wordpress root file<\/p>\n<p>and adding 2 these codes:<\/p>\n<pre>define('WP_ADMIN_DIR', 'your-custom-folder');\r\ndefine( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . WP_ADMIN_DIR);<\/pre>\n<p><strong>Step 2<\/strong>. Go to the theme that you are using and open the functions.php file<\/p>\n<p>Add this code to the bottom of the file:<\/p>\n<pre>add_filter('site_url', 'wpadmin_filter', 10, 3);\r\n function wpadmin_filter( $url, $path, $orig_scheme ) {\r\n $old = array( \"\/(wp-admin)\/\");\r\n $admin_dir = WP_ADMIN_DIR;\r\n $new = array($admin_dir);\r\n return preg_replace( $old, $new, $url, 1);\r\n }<\/pre>\n<p><strong>Step 3<\/strong>. You need to declare a new url with .htaccess file so add this code to your htaccess in your website.<\/p>\n<pre>RewriteRule ^your-custom-folder\/(.*) wp-admin\/$1?%{QUERY_STRING} [L]<\/pre>\n<p>Hope this helps!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Step 1. Finding file wp-config.php in your wordpress root file and adding 2 these codes: define(&#8216;WP_ADMIN_DIR&#8217;, &#8216;your-custom-folder&#8217;); define( &#8216;ADMIN_COOKIE_PATH&#8217;, SITECOOKIEPATH . WP_ADMIN_DIR); Step 2. Go to the theme that you are using and open the functions.php file Add this code to the bottom of the file: add_filter(&#8216;site_url&#8217;, &#8216;wpadmin_filter&#8217;, 10, 3); function wpadmin_filter( $url, $path, $orig_scheme [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":384,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[58],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to change Wordpress WP-Admin URL - Webmaster Sun Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webmastersun.com\/blog\/how-to-change-wordpress-wp-admin-url\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to change Wordpress WP-Admin URL - Webmaster Sun Blog\" \/>\n<meta property=\"og:description\" content=\"Step 1. Finding file wp-config.php in your wordpress root file and adding 2 these codes: define(&#039;WP_ADMIN_DIR&#039;, &#039;your-custom-folder&#039;); define( &#039;ADMIN_COOKIE_PATH&#039;, SITECOOKIEPATH . WP_ADMIN_DIR); Step 2. Go to the theme that you are using and open the functions.php file Add this code to the bottom of the file: add_filter(&#039;site_url&#039;, &#039;wpadmin_filter&#039;, 10, 3); function wpadmin_filter( $url, $path, $orig_scheme [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webmastersun.com\/blog\/how-to-change-wordpress-wp-admin-url\/\" \/>\n<meta property=\"og:site_name\" content=\"Webmaster Sun Blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-02-03T15:36:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-02-10T14:03:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webmastersun.com\/blog\/wp-content\/uploads\/2014\/02\/how-to-change-wp-admin-wordpress.png\" \/>\n\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t<meta property=\"og:image:height\" content=\"393\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tommy\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webmastersun.com\/blog\/#website\",\"url\":\"https:\/\/www.webmastersun.com\/blog\/\",\"name\":\"Webmaster Sun Blog\",\"description\":\"Blogging Tips to help you make money online\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webmastersun.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.webmastersun.com\/blog\/how-to-change-wordpress-wp-admin-url\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.webmastersun.com\/blog\/wp-content\/uploads\/2014\/02\/how-to-change-wp-admin-wordpress.png\",\"contentUrl\":\"https:\/\/www.webmastersun.com\/blog\/wp-content\/uploads\/2014\/02\/how-to-change-wp-admin-wordpress.png\",\"width\":350,\"height\":393},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webmastersun.com\/blog\/how-to-change-wordpress-wp-admin-url\/#webpage\",\"url\":\"https:\/\/www.webmastersun.com\/blog\/how-to-change-wordpress-wp-admin-url\/\",\"name\":\"How to change Wordpress WP-Admin URL - Webmaster Sun Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.webmastersun.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webmastersun.com\/blog\/how-to-change-wordpress-wp-admin-url\/#primaryimage\"},\"datePublished\":\"2014-02-03T15:36:53+00:00\",\"dateModified\":\"2014-02-10T14:03:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.webmastersun.com\/blog\/#\/schema\/person\/441faf493750eb1507f97d50ea9cd742\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.webmastersun.com\/blog\/how-to-change-wordpress-wp-admin-url\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webmastersun.com\/blog\/how-to-change-wordpress-wp-admin-url\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webmastersun.com\/blog\/how-to-change-wordpress-wp-admin-url\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webmastersun.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to change WordPress WP-Admin URL\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webmastersun.com\/blog\/#\/schema\/person\/441faf493750eb1507f97d50ea9cd742\",\"name\":\"Tommy\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.webmastersun.com\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b17c25a7f242f8dc0328ed5929c512fd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b17c25a7f242f8dc0328ed5929c512fd?s=96&d=mm&r=g\",\"caption\":\"Tommy\"},\"url\":\"https:\/\/www.webmastersun.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to change Wordpress WP-Admin URL - Webmaster Sun Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webmastersun.com\/blog\/how-to-change-wordpress-wp-admin-url\/","og_locale":"en_US","og_type":"article","og_title":"How to change Wordpress WP-Admin URL - Webmaster Sun Blog","og_description":"Step 1. Finding file wp-config.php in your wordpress root file and adding 2 these codes: define('WP_ADMIN_DIR', 'your-custom-folder'); define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . WP_ADMIN_DIR); Step 2. Go to the theme that you are using and open the functions.php file Add this code to the bottom of the file: add_filter('site_url', 'wpadmin_filter', 10, 3); function wpadmin_filter( $url, $path, $orig_scheme [&hellip;]","og_url":"https:\/\/www.webmastersun.com\/blog\/how-to-change-wordpress-wp-admin-url\/","og_site_name":"Webmaster Sun Blog","article_published_time":"2014-02-03T15:36:53+00:00","article_modified_time":"2014-02-10T14:03:35+00:00","og_image":[{"width":350,"height":393,"url":"https:\/\/www.webmastersun.com\/blog\/wp-content\/uploads\/2014\/02\/how-to-change-wp-admin-wordpress.png","type":"image\/png"}],"twitter_misc":{"Written by":"Tommy","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/www.webmastersun.com\/blog\/#website","url":"https:\/\/www.webmastersun.com\/blog\/","name":"Webmaster Sun Blog","description":"Blogging Tips to help you make money online","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webmastersun.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/www.webmastersun.com\/blog\/how-to-change-wordpress-wp-admin-url\/#primaryimage","inLanguage":"en-US","url":"https:\/\/www.webmastersun.com\/blog\/wp-content\/uploads\/2014\/02\/how-to-change-wp-admin-wordpress.png","contentUrl":"https:\/\/www.webmastersun.com\/blog\/wp-content\/uploads\/2014\/02\/how-to-change-wp-admin-wordpress.png","width":350,"height":393},{"@type":"WebPage","@id":"https:\/\/www.webmastersun.com\/blog\/how-to-change-wordpress-wp-admin-url\/#webpage","url":"https:\/\/www.webmastersun.com\/blog\/how-to-change-wordpress-wp-admin-url\/","name":"How to change Wordpress WP-Admin URL - Webmaster Sun Blog","isPartOf":{"@id":"https:\/\/www.webmastersun.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webmastersun.com\/blog\/how-to-change-wordpress-wp-admin-url\/#primaryimage"},"datePublished":"2014-02-03T15:36:53+00:00","dateModified":"2014-02-10T14:03:35+00:00","author":{"@id":"https:\/\/www.webmastersun.com\/blog\/#\/schema\/person\/441faf493750eb1507f97d50ea9cd742"},"breadcrumb":{"@id":"https:\/\/www.webmastersun.com\/blog\/how-to-change-wordpress-wp-admin-url\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webmastersun.com\/blog\/how-to-change-wordpress-wp-admin-url\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.webmastersun.com\/blog\/how-to-change-wordpress-wp-admin-url\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webmastersun.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to change WordPress WP-Admin URL"}]},{"@type":"Person","@id":"https:\/\/www.webmastersun.com\/blog\/#\/schema\/person\/441faf493750eb1507f97d50ea9cd742","name":"Tommy","image":{"@type":"ImageObject","@id":"https:\/\/www.webmastersun.com\/blog\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/b17c25a7f242f8dc0328ed5929c512fd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b17c25a7f242f8dc0328ed5929c512fd?s=96&d=mm&r=g","caption":"Tommy"},"url":"https:\/\/www.webmastersun.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webmastersun.com\/blog\/wp-json\/wp\/v2\/posts\/383"}],"collection":[{"href":"https:\/\/www.webmastersun.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webmastersun.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webmastersun.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webmastersun.com\/blog\/wp-json\/wp\/v2\/comments?post=383"}],"version-history":[{"count":0,"href":"https:\/\/www.webmastersun.com\/blog\/wp-json\/wp\/v2\/posts\/383\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webmastersun.com\/blog\/wp-json\/wp\/v2\/media\/384"}],"wp:attachment":[{"href":"https:\/\/www.webmastersun.com\/blog\/wp-json\/wp\/v2\/media?parent=383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webmastersun.com\/blog\/wp-json\/wp\/v2\/categories?post=383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webmastersun.com\/blog\/wp-json\/wp\/v2\/tags?post=383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}