{"id":245,"date":"2023-07-31T07:59:24","date_gmt":"2023-07-31T07:59:24","guid":{"rendered":"https:\/\/cainhosting.com\/community\/?post_type=ht_kb&#038;p=245"},"modified":"2024-01-23T05:18:34","modified_gmt":"2024-01-23T05:18:34","slug":"automatically-create-wordpress-on-directadmin-account-creation","status":"publish","type":"ht_kb","link":"https:\/\/cainhosting.com\/community\/knowledge-base\/automatically-create-wordpress-on-directadmin-account-creation\/","title":{"rendered":"Automatically Create WordPress on DirectAdmin account creation."},"content":{"rendered":"\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-263 size-full\" src=\"https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/automated_wordpress_installation_directadmin.jpg\" alt=\"Automated WordPress Installation on DirectAdmin\" width=\"1200\" height=\"900\" title=\"\" srcset=\"https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/automated_wordpress_installation_directadmin.jpg 1200w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/automated_wordpress_installation_directadmin-300x225.jpg 300w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/automated_wordpress_installation_directadmin-1024x768.jpg 1024w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/automated_wordpress_installation_directadmin-768x576.jpg 768w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/automated_wordpress_installation_directadmin-50x38.jpg 50w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/automated_wordpress_installation_directadmin-60x45.jpg 60w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/automated_wordpress_installation_directadmin-100x75.jpg 100w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n\n\n\n<div class=\"sc-d49d9662-3 ikmaHj \n  ReactMarkdown\n  rounded-xl\n  px-3\n  py-2\n  break-words\n  text-stone-900\n  transition-all\n  grid\n  gap-3\n  grid-cols-1\n  max-w-[75ch]\n  bg-white place-self-start\n  \">\n<div class=\"contents\">\n<p class=\"whitespace-pre-wrap\"><a href=\"https:\/\/wordpress.org\/\" target=\"_blank\" rel=\"noopener\">WordPress<\/a> is an open-source content management system (CMS) based on <a href=\"https:\/\/www.php.net\/\" target=\"_blank\" rel=\"noopener\">PHP<\/a> and <a href=\"https:\/\/www.mysql.com\/\" target=\"_blank\" rel=\"noopener\">MySQL<\/a>. It is used by millions of websites and blogs to build and manage their content.<\/p>\n<ul class=\"list-disc pl-8 space-y-2\">\n<li class=\"whitespace-normal\">It is an open-source CMS, meaning the core software is free and publicly available to use and modify. It is developed and maintained by a community of contributors.<\/li>\n<li class=\"whitespace-normal\">WordPress allows users to easily build and manage websites and blogs without needing to know coding. It has an intuitive dashboard and theming system that makes creating professional looking sites simple.<\/li>\n<li class=\"whitespace-normal\">At its core, WordPress is focused on content creation and publishing. It provides tools for authors and editors to write posts and pages, add media, and manage comments. The admin area makes site management easy.<\/li>\n<li class=\"whitespace-normal\">WordPress is highly extensible through plugins and themes. Thousands of plugins extend functionality from SEO to ecommerce to security. Themes control the appearance and customize the site design.<\/li>\n<li class=\"whitespace-normal\">It is used by over 40% of all websites worldwide, from personal blogs to huge news sites.<\/li>\n<li class=\"whitespace-normal\">WordPress can be hosted on <a href=\"https:\/\/cainhosting.com\/\" target=\"_blank\" rel=\"noopener\">regular web hosts<\/a> or <a href=\"https:\/\/cainhosting.com\/wordpress-hosting.php\" target=\"_blank\" rel=\"noopener\">specialized WordPress hosting<\/a> services. It can be installed on your own server or used through hosted solutions like WordPress.com.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<p>\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"prerequisites\" >Prerequisites<\/h2>\n\n\n\n<h2 id=\"install-wordpress-cli-wp-cli\" >Install WordPress-CLI (WP-CLI)<\/h2>\n<p>The recommended way to install <span class=\"glossary-item-container\" tabindex=\"0\">WP-CLI<\/span> is by downloading the Phar build (archives similar to Java JAR files, <a href=\"http:\/\/php.net\/manual\/en\/phar.using.intro.php\" target=\"_blank\" rel=\"noopener\">see this article for more detail<\/a>), marking it executable, and placing it on your PATH.<\/p>\n<p>First, download <a href=\"https:\/\/raw.githubusercontent.com\/wp-cli\/builds\/gh-pages\/phar\/wp-cli.phar\" target=\"_blank\" rel=\"noopener\">wp-cli.phar<\/a> using <strong>wget<\/strong> or <strong>curl<\/strong>. For example:<code><br \/><\/code><\/p>\n<p>\u00a0<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"curl -O https:\/\/raw.githubusercontent.com\/wp-cli\/builds\/gh-pages\/phar\/wp-cli.phar\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">curl<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">O<\/span><span style=\"color: #D8DEE9FF\"> https<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #616E88\">\/\/raw.githubusercontent.com\/wp-cli\/builds\/gh-pages\/phar\/wp-cli.phar<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>&nbsp;<\/p>\n<p>Then, check if it works:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"php wp-cli.phar --info\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">php<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">wp<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">cli<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">phar<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">info<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>&nbsp;<\/p>\n<p>To be able to type just <strong>wp<\/strong>, instead of <strong>php wp-cli.phar<\/strong>, you need to make the file executable and move it to somewhere in your PATH. For example:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"chmod +x wp-cli.phar\nsudo mv wp-cli.phar \/usr\/local\/bin\/wp\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">chmod<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">+<\/span><span style=\"color: #D8DEE9\">x<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">wp<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">cli<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">phar<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">mv<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">wp<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">cli<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">phar<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">usr<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">local<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">bin<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">wp<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>&nbsp;<\/p>\n<p>Now try running <strong>wp &#8211;info<\/strong>. If <strong>WP-CLI<\/strong> is installed successfully, you\u2019ll see output like this:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"OS:     Linux 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64\nShell:  \/bin\/bash\nPHP binary:     \/usr\/local\/php74\/bin\/php74\nPHP version:    7.4.33\nphp.ini used:   \/usr\/local\/php74\/lib\/php.ini\nMySQL binary:   \/usr\/local\/bin\/mysql\nMySQL version:  mysql  Ver 15.1 Distrib 10.6.12-MariaDB, for linux-systemd (x86_64) using readline 5.1\nSQL modes:\nWP-CLI root dir:        phar:\/\/wp-cli.phar\/vendor\/wp-cli\/wp-cli\nWP-CLI vendor dir:      phar:\/\/wp-cli.phar\/vendor\nWP_CLI phar path:       \/root\nWP-CLI packages dir:\nWP-CLI cache dir:       \/root\/.wp-cli\/cache\nWP-CLI global config:\nWP-CLI project config:\nWP-CLI version: 2.8.1\n\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">OS<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #D8DEE9\">Linux<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">5.4<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #B48EAD\">0<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #B48EAD\">90<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">generic<\/span><span style=\"color: #D8DEE9FF\"> #<\/span><span style=\"color: #B48EAD\">101<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">Ubuntu<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">SMP<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">Fri<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">Oct<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">15<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">20<\/span><span style=\"color: #D8DEE9FF\">:<\/span><span style=\"color: #B48EAD\">00<\/span><span style=\"color: #D8DEE9FF\">:<\/span><span style=\"color: #B48EAD\">55<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">UTC<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">2021<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">x86_64<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">Shell<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">bin<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">bash<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">PHP<\/span><span style=\"color: #D8DEE9FF\"> binary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\">     <\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">usr<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">local<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">php74<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">bin<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">php74<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">PHP<\/span><span style=\"color: #D8DEE9FF\"> version<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #B48EAD\">7.4<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #B48EAD\">33<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">php<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">ini<\/span><span style=\"color: #D8DEE9FF\"> used<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\">   <\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">usr<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">local<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">php74<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">lib<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">php<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">ini<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">MySQL<\/span><span style=\"color: #D8DEE9FF\"> binary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\">   <\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">usr<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">local<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">bin<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">mysql<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">MySQL<\/span><span style=\"color: #D8DEE9FF\"> version<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">mysql<\/span><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">Ver<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">15.1<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">Distrib<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">10.6<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #B48EAD\">12<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">MariaDB<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">for<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">linux<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #88C0D0\">systemd<\/span><span style=\"color: #D8DEE9FF\"> (<\/span><span style=\"color: #D8DEE9\">x86_64<\/span><span style=\"color: #D8DEE9FF\">) <\/span><span style=\"color: #81A1C1\">using<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">readline<\/span><span style=\"color: #D8DEE9FF\"> 5.1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">SQL<\/span><span style=\"color: #D8DEE9FF\"> modes<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">WP<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">CLI<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">root<\/span><span style=\"color: #D8DEE9FF\"> dir<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\">        phar<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #616E88\">\/\/wp-cli.phar\/vendor\/wp-cli\/wp-cli<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">WP<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">CLI<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">vendor<\/span><span style=\"color: #D8DEE9FF\"> dir<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\">      phar<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #616E88\">\/\/wp-cli.phar\/vendor<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">WP_CLI<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">phar<\/span><span style=\"color: #D8DEE9FF\"> path<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\">       <\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">root<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">WP<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">CLI<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">packages<\/span><span style=\"color: #D8DEE9FF\"> dir<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">WP<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">CLI<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">cache<\/span><span style=\"color: #D8DEE9FF\"> dir<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #EBCB8B\">       <\/span><span style=\"color: #ECEFF4\">\/<\/span><span style=\"color: #EBCB8B\">root<\/span><span style=\"color: #ECEFF4\">\/<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">wp<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">cli<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">cache<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">WP<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">CLI<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">global<\/span><span style=\"color: #D8DEE9FF\"> config<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">WP<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">CLI<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">project<\/span><span style=\"color: #D8DEE9FF\"> config<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">WP<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">CLI<\/span><span style=\"color: #D8DEE9FF\"> version<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">2.8<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #B48EAD\">1<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 id=\"_\" >&nbsp;<\/h2>\n<h2 id=\"symlink-mysql-sock\" >Symlink mysql.sock<\/h2>\n<p>Since wp-cli defaults to \/tmp\/mysql.sock, and there&#8217;s no way to put a flag or command line variable, we will simply symlink DirectAdmin&#8217;s mysql.sock to \/tmp.<\/p>\n    \t\t<div class=\"hts-messages hts-messages--alert    \"   >\r\n    \t\t\t    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\tThis will in no way affect any of your databases, or DirectAdmin&#8217;s functionality.    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n<p>This way <strong>wp-cli<\/strong> can create a database, user, and password for the new WP site automatically.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"ln -s \/usr\/local\/mysql\/data\/mysql.sock \/tmp\/mysql.sock\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">ln<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">s<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">usr<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">local<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">mysql<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">data<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">mysql<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">sock<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">tmp<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">mysql<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">sock<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 id=\"automated-wordpress-install-on-directadmin-script\" >Automated WordPress Install on DirectAdmin Script<\/h2>\n<p>Create install_wp.sh here: <strong>\/usr\/local\/directadmin\/scripts\/custom\/user_create_post\/install_wp.sh<\/strong><\/p>\n<p>Create a file, <strong>\/usr\/local\/directadmin\/scripts\/adminpassword<\/strong><\/p>\n<p>Put in your DA admin password here, nothing else.<\/p>\n<p>Then chown the file:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"chown diradmin:diradmin \/usr\/local\/directadmin\/scripts\/adminpassword\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">chown<\/span><span style=\"color: #D8DEE9FF\"> diradmin<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9\">diradmin<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">usr<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">local<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">directadmin<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">scripts<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">adminpassword<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><strong>There will be a few parts that you will have to manually change.<\/strong><\/p>\n<p># Constants<br><strong>DIRECTADMIN_HOSTNAME<\/strong><br><strong>DIRECTADMIN_PORT<\/strong><br><strong>DIRECTADMIN_USERNAME<\/strong><br><strong>DIRECTADMIN_PASSWORD<\/strong><\/p>\n<p>Change the <strong>DIRECTADMIN_HOSTNAME&nbsp;<\/strong>to your server <strong>DA URL, without any http:\/\/ or trailing slashes.<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p># Check the package name and install WordPress if it matches<br>if [[ &#8220;${package}&#8221; = &#8220;<strong>wordpress_10gb<\/strong>&#8221; ]] || [[ &#8220;${package}&#8221; = &#8220;<strong>wordpress_50gb<\/strong>&#8221; ]] || [[ &#8220;${package}&#8221; = &#8220;<strong>wordpress_100gb<\/strong>&#8221; ]]; then<\/p>\n<p><strong>Change the package names<\/strong> here to whatever you want to use.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"#!\/bin\/bash\n\n# Constants\nDIRECTADMIN_HOSTNAME=&quot;your.directadminurl.com&quot;\nDIRECTADMIN_PORT=2222\nDIRECTADMIN_USERNAME=&quot;admin&quot;\nDIRECTADMIN_PASSWORD=$(cat \/usr\/local\/directadmin\/scripts\/adminpassword) # assuming you stored your password in a secure file\nDIRECTADMIN_HTTPS=true  # Set this to true if your DirectAdmin server uses HTTPS\n\n# The protocol should be https if DIRECTADMIN_HTTPS is true, http otherwise\nif [ &quot;$DIRECTADMIN_HTTPS&quot; = true ]; then\n  PROTOCOL=&quot;https&quot;\nelse\n  PROTOCOL=&quot;http&quot;\nfi\n\n# Directory to the user's public_html\nUSER_DIR=\/home\/${username}\/domains\/${domain}\/public_html\n\n# Admin username, password, and email\nADMIN_USER=${username} # use the username provided during account creation\nADMIN_PASSWORD=$(openssl rand -base64 12 | tr -dc 'a-zA-Z0-9') # use openssl to randomly generate a password\nADMIN_EMAIL=${email}\n\n# Check the package name and install WordPress if it matches\nif [[ &quot;${package}&quot; = &quot;wordpress_10gb&quot; ]] || [[ &quot;${package}&quot; = &quot;wordpress_50gb&quot; ]] || [[ &quot;${package}&quot; = &quot;wordpress_100gb&quot; ]]; then\n\n# MySQL Database details\nDB_NAME=&quot;wp&quot;\nDB_USER=&quot;wp&quot;\nDB_PASSWORD=$(openssl rand -base64 12 | tr -dc 'a-zA-Z0-9')\n\n# DirectAdmin API URL for MySQL database creation\nAPI_URL_DB=&quot;${PROTOCOL}:\/\/${DIRECTADMIN_HOSTNAME}:${DIRECTADMIN_PORT}\/CMD_API_DATABASES&quot;\n\n# Create the MySQL database\nRESPONSE_DB=$(curl -s -u &quot;${DIRECTADMIN_USERNAME}|${username}:${DIRECTADMIN_PASSWORD}&quot; -d &quot;action=create&amp;name=${DB_NAME}&amp;user=${DB_USER}&amp;passwd=${DB_PASSWORD}&amp;passwd2=${DB_PASSWORD}&quot; &quot;${API_URL_DB}&quot;)\n\nif [[ $RESPONSE_DB == *&quot;error=0&quot;* ]]; then\n    echo &quot;Database created successfully.&quot;\n\n    # Download WordPress\n    sudo -u ${username} wp core download --path=${USER_DIR} --allow-root\n\n    # Full path to wp executable. Replace this with the actual path.\n    WP_CLI_PATH=&quot;\/usr\/local\/bin\/wp&quot;\n    \n    # Create the wp-config file\n    sudo $WP_CLI_PATH config create --dbname=${username}_${DB_NAME} --dbuser=${username}_${DB_USER} --dbpass=${DB_PASSWORD} --dbhost=localhost --path=${USER_DIR} --allow-root\n    \n    # Change the ownership of the wp-config.php file\n    sudo chown ${username}:${username} ${USER_DIR}\/wp-config.php\n    \n    # Install WordPress\n    sudo $WP_CLI_PATH core install --url=&quot;${domain}&quot; --title=&quot;New WordPress Site&quot; --admin_user=${ADMIN_USER} --admin_password=&quot;${ADMIN_PASSWORD}&quot; --admin_email=${ADMIN_EMAIL} --path=${USER_DIR} --allow-root\n\nelse\n    echo &quot;Error creating database. $RESPONSE_DB&quot;\nfi\nfi\n\nexit 0;\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #616E88\">#!\/bin\/bash<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\"># <\/span><span style=\"color: #D8DEE9\">Constants<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">DIRECTADMIN_HOSTNAME<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">your.directadminurl.com<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">DIRECTADMIN_PORT<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">2222<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">DIRECTADMIN_USERNAME<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">admin<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">DIRECTADMIN_PASSWORD<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">cat<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">usr<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">local<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">directadmin<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">scripts<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">adminpassword<\/span><span style=\"color: #D8DEE9FF\">) # <\/span><span style=\"color: #D8DEE9\">assuming<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">you<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">stored<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">your<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">password<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">in<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">a<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">secure<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">file<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">DIRECTADMIN_HTTPS<\/span><span style=\"color: #81A1C1\">=true<\/span><span style=\"color: #D8DEE9FF\">  # <\/span><span style=\"color: #D8DEE9\">Set<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">this<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">to<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">true<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">if<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">your<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">DirectAdmin<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">server<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">uses<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">HTTPS<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\"># <\/span><span style=\"color: #D8DEE9\">The<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">protocol<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">should<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">be<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">https<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">if<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">DIRECTADMIN_HTTPS<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">is<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">true<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">http<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">otherwise<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">if<\/span><span style=\"color: #D8DEE9FF\"> [ <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">$DIRECTADMIN_HTTPS<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">true<\/span><span style=\"color: #D8DEE9FF\"> ]<\/span><span style=\"color: #81A1C1\">;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">then<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">PROTOCOL<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">https<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">else<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">PROTOCOL<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">http<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">fi<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\"># <\/span><span style=\"color: #D8DEE9\">Directory<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">to<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">the<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">user<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">s public_htm<\/span><span style=\"color: #D8DEE9\">l<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">USER_DIR<\/span><span style=\"color: #81A1C1\">=\/<\/span><span style=\"color: #D8DEE9\">home<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">$<\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9\">username<\/span><span style=\"color: #ECEFF4\">}<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">domains<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">$<\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9\">domain<\/span><span style=\"color: #ECEFF4\">}<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">public_html<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\"># <\/span><span style=\"color: #D8DEE9\">Admin<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">username<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">password<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">and<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">email<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">ADMIN_USER<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">$<\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9\">username<\/span><span style=\"color: #ECEFF4\">}<\/span><span style=\"color: #D8DEE9FF\"> # <\/span><span style=\"color: #D8DEE9\">use<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">the<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">username<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">provided<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">during<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">account<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">creation<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">ADMIN_PASSWORD<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">openssl<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">rand<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">base64<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">12<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">|<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">tr<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">dc<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">a-zA-Z0-9<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">) # <\/span><span style=\"color: #D8DEE9\">use<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">openssl<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">to<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">randomly<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">generate<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">a<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">password<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">ADMIN_EMAIL<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">$<\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9\">email<\/span><span style=\"color: #ECEFF4\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\"># <\/span><span style=\"color: #D8DEE9\">Check<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">the<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">package<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">name<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">and<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">install<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">WordPress<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">if<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">it<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">matches<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">if<\/span><span style=\"color: #D8DEE9FF\"> [[ <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">${package}<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">wordpress_10gb<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> ]] <\/span><span style=\"color: #81A1C1\">||<\/span><span style=\"color: #D8DEE9FF\"> [[ <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">${package}<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">wordpress_50gb<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> ]] <\/span><span style=\"color: #81A1C1\">||<\/span><span style=\"color: #D8DEE9FF\"> [[ <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">${package}<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">wordpress_100gb<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> ]]<\/span><span style=\"color: #81A1C1\">;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">then<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\"># <\/span><span style=\"color: #D8DEE9\">MySQL<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">Database<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">details<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">DB_NAME<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">wp<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">DB_USER<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">wp<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">DB_PASSWORD<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">openssl<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">rand<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">base64<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">12<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">|<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">tr<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">dc<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">a-zA-Z0-9<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\"># <\/span><span style=\"color: #D8DEE9\">DirectAdmin<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">API<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">URL<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">for<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">MySQL<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">database<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">creation<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">API_URL_DB<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">${PROTOCOL}:\/\/${DIRECTADMIN_HOSTNAME}:${DIRECTADMIN_PORT}\/CMD_API_DATABASES<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\"># <\/span><span style=\"color: #D8DEE9\">Create<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">the<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">MySQL<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">database<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">RESPONSE_DB<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">curl<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">s<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">u<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">${DIRECTADMIN_USERNAME}|${username}:${DIRECTADMIN_PASSWORD}<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">d<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">action=create&amp;name=${DB_NAME}&amp;user=${DB_USER}&amp;passwd=${DB_PASSWORD}&amp;passwd2=${DB_PASSWORD}<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">${API_URL_DB}<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">if<\/span><span style=\"color: #D8DEE9FF\"> [[ <\/span><span style=\"color: #D8DEE9\">$RESPONSE_DB<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">==<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">*<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">error=0<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #81A1C1\">*<\/span><span style=\"color: #D8DEE9FF\"> ]]<\/span><span style=\"color: #81A1C1\">;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">then<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #D8DEE9\">echo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Database created successfully.<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    # <\/span><span style=\"color: #D8DEE9\">Download<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">WordPress<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #D8DEE9\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">u<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">$<\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9\">username<\/span><span style=\"color: #ECEFF4\">}<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">wp<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">core<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">download<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">path<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">$<\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9\">USER_DIR<\/span><span style=\"color: #ECEFF4\">}<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">allow<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">root<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    # <\/span><span style=\"color: #D8DEE9\">Full<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">path<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">to<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">wp<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">executable<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">Replace<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">this<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">with<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">the<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">actual<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">path<\/span><span style=\"color: #ECEFF4\">.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #D8DEE9\">WP_CLI_PATH<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">\/usr\/local\/bin\/wp<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    # <\/span><span style=\"color: #D8DEE9\">Create<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">the<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">wp<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">config<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">file<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #D8DEE9\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">$WP_CLI_PATH<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">config<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">create<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">dbname<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">$<\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9\">username<\/span><span style=\"color: #ECEFF4\">}<\/span><span style=\"color: #D8DEE9\">_$<\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9\">DB_NAME<\/span><span style=\"color: #ECEFF4\">}<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">dbuser<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">$<\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9\">username<\/span><span style=\"color: #ECEFF4\">}<\/span><span style=\"color: #D8DEE9\">_$<\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9\">DB_USER<\/span><span style=\"color: #ECEFF4\">}<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">dbpass<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">$<\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9\">DB_PASSWORD<\/span><span style=\"color: #ECEFF4\">}<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">dbhost<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">localhost<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">path<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">$<\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9\">USER_DIR<\/span><span style=\"color: #ECEFF4\">}<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">allow<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">root<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    # <\/span><span style=\"color: #D8DEE9\">Change<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">the<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">ownership<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">of<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">the<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">wp<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">config<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">php<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">file<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #D8DEE9\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">chown<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">$<\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9\">username<\/span><span style=\"color: #ECEFF4\">}<\/span><span style=\"color: #D8DEE9FF\">:<\/span><span style=\"color: #D8DEE9\">$<\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9\">username<\/span><span style=\"color: #ECEFF4\">}<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">$<\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9\">USER_DIR<\/span><span style=\"color: #ECEFF4\">}<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">wp<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">config<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    # <\/span><span style=\"color: #D8DEE9\">Install<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">WordPress<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #D8DEE9\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">$WP_CLI_PATH<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">core<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">install<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">url<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">${domain}<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">title<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">New WordPress Site<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">admin_user<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">$<\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9\">ADMIN_USER<\/span><span style=\"color: #ECEFF4\">}<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">admin_password<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">${ADMIN_PASSWORD}<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">admin_email<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">$<\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9\">ADMIN_EMAIL<\/span><span style=\"color: #ECEFF4\">}<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">path<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">$<\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9\">USER_DIR<\/span><span style=\"color: #ECEFF4\">}<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">allow<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">root<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">else<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #D8DEE9\">echo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Error creating database. $RESPONSE_DB<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">fi<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">fi<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">exit<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">0<\/span><span style=\"color: #81A1C1\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>&nbsp;<\/p>\n    \t\t<div class=\"hts-messages hts-messages--success    \"   >\r\n    \t\t\t    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\tThat&#8217;s it, no more editing.    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n\n\n\n<h2 id=\"how-the-script-works\" >How the script works<\/h2>\n\n\n\n<p>Whenever an account is created, the script will run via DirectAdmin&#8217;s hook system. This particular WordPress auto-installer script will check the packages you have set in the script, if they are found, it will proceed to install the WordPress site on the account. If the package is not used, or found, the script will simply stop. So you won&#8217;t have to worry about other account types accidentally having WordPress auto-installed on them.<\/p>\n<h2 id=\"screenshots-of-it-working\" >Screenshots of it working<\/h2>\n<p>Creating the user account manually.<\/p>\n    \t\t<div class=\"hts-messages hts-messages--success    \"   >\r\n    \t\t\t    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\tPlease note, if you use WHMCS or another billing solution this will still work as it&#8217;s run via DirectAdmin&#8217;s hook system.    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"476\" src=\"https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/create_user-1024x476.jpg\" alt=\"\" class=\"wp-image-255\" title=\"\" srcset=\"https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/create_user-1024x476.jpg 1024w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/create_user-300x139.jpg 300w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/create_user-768x357.jpg 768w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/create_user-50x23.jpg 50w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/create_user-60x28.jpg 60w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/create_user-100x46.jpg 100w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/create_user.jpg 1444w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 id=\"_\" >&nbsp;<\/h2>\n\n\n\n<h2 id=\"user-created-successfully-message-with-additional-wordpress-installation-information\" >User created successfully message, with additional WordPress installation information.<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"712\" height=\"482\" src=\"https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/create_user_finished.jpg\" alt=\"\" class=\"wp-image-256\" title=\"\" srcset=\"https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/create_user_finished.jpg 712w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/create_user_finished-300x203.jpg 300w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/create_user_finished-50x34.jpg 50w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/create_user_finished-60x41.jpg 60w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/create_user_finished-100x68.jpg 100w\" sizes=\"auto, (max-width: 712px) 100vw, 712px\" \/><\/figure>\n\n\n\n<h2 id=\"_\" >&nbsp;<\/h2>\n\n\n\n<h2 id=\"wordpress-site-will-automatically-email-the-user-information-to-the-account-owner\" >WordPress site will automatically email the user information to the account owner.<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"533\" height=\"419\" src=\"https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_email_auto.jpg\" alt=\"\" class=\"wp-image-257\" title=\"\" srcset=\"https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_email_auto.jpg 533w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_email_auto-300x236.jpg 300w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_email_auto-50x39.jpg 50w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_email_auto-60x47.jpg 60w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_email_auto-100x79.jpg 100w\" sizes=\"auto, (max-width: 533px) 100vw, 533px\" \/><\/figure>\n\n\n\n<h2 id=\"automatically-works-with-directadmins-wordpress-manager\" >Automatically works with DirectAdmin&#8217;s WordPress Manager<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"416\" src=\"https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_manager-1024x416.jpg\" alt=\"\" class=\"wp-image-258\" title=\"\" srcset=\"https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_manager-1024x416.jpg 1024w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_manager-300x122.jpg 300w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_manager-768x312.jpg 768w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_manager-50x20.jpg 50w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_manager-1536x624.jpg 1536w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_manager-60x24.jpg 60w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_manager-100x41.jpg 100w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_manager.jpg 1896w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"307\" src=\"https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_manager_admin-1024x307.jpg\" alt=\"\" class=\"wp-image-260\" title=\"\" srcset=\"https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_manager_admin-1024x307.jpg 1024w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_manager_admin-300x90.jpg 300w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_manager_admin-768x230.jpg 768w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_manager_admin-50x15.jpg 50w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_manager_admin-1536x461.jpg 1536w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_manager_admin-60x18.jpg 60w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_manager_admin-100x30.jpg 100w, https:\/\/cainhosting.com\/community\/wp-content\/uploads\/2023\/07\/wordpress_manager_admin.jpg 1893w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>WordPress is an open-source content management system (CMS) based on PHP and MySQL. It is used by millions of websites and blogs to build and manage their content. It is an open-source CMS, meaning the core software is free and publicly available to use and modify. It is developed and&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"ht-kb-category":[33],"ht-kb-tag":[43,40,39,29,41,42,45,46,47],"class_list":["post-245","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-directadmin","ht_kb_tag-automation","ht_kb_tag-bash","ht_kb_tag-directadmin","ht_kb_tag-mysql","ht_kb_tag-ssh","ht_kb_tag-terminal","ht_kb_tag-wordpress","ht_kb_tag-wp-cli","ht_kb_tag-wpcli"],"_links":{"self":[{"href":"https:\/\/cainhosting.com\/community\/wp-json\/wp\/v2\/ht-kb\/245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cainhosting.com\/community\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/cainhosting.com\/community\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/cainhosting.com\/community\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cainhosting.com\/community\/wp-json\/wp\/v2\/comments?post=245"}],"version-history":[{"count":18,"href":"https:\/\/cainhosting.com\/community\/wp-json\/wp\/v2\/ht-kb\/245\/revisions"}],"predecessor-version":[{"id":408,"href":"https:\/\/cainhosting.com\/community\/wp-json\/wp\/v2\/ht-kb\/245\/revisions\/408"}],"wp:attachment":[{"href":"https:\/\/cainhosting.com\/community\/wp-json\/wp\/v2\/media?parent=245"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/cainhosting.com\/community\/wp-json\/wp\/v2\/ht-kb-category?post=245"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/cainhosting.com\/community\/wp-json\/wp\/v2\/ht-kb-tag?post=245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}