{"slug":"cpanel-wordpress-setup","title":"cPanel WordPress Hosting Setup","tags":["cpanel","hosting","dns","ssl","database"],"agent_summary":"cPanel procedures for WordPress hosting: domain setup, DNS records, MySQL database creation, SSL installation, PHP configuration, and backup scheduling.","trigger_phrases":["cpanel wordpress","add domain cpanel","cpanel mysql database","cpanel ssl wordpress","cpanel php settings"],"runnable":false,"markdown":"\nStandard cPanel setup sequence for a new WordPress installation.\n\n## 1. Add Domain\n\ncPanel > Domains > Addon Domains:\n1. Enter domain name\n2. Document root auto-fills (e.g., `public_html/domain.com`)\n3. Click \"Add Domain\"\n\n## 2. DNS Records\n\ncPanel > Domains > Zone Editor. Minimum required records:\n\n| Type | Name | Value |\n|------|------|-------|\n| A | @ | Server IP |\n| A | www | Server IP |\n| CNAME | mail | domain.com |\n| MX | @ | mail.domain.com |\n| TXT | @ | v=spf1 +a +mx ~all |\n\nAllow 15-60 minutes for propagation before proceeding.\n\n## 3. Create MySQL Database\n\ncPanel > Databases > MySQL Databases:\n1. Create database: `user_wpdb`\n2. Create user: `user_wpuser` (generate strong password)\n3. Add user to database with ALL PRIVILEGES\n\nNote the database name, username, and password — needed during WordPress install.\n\n## 4. Install WordPress\n\nUse Softaculous (cPanel > Software > Softaculous):\n1. Select WordPress\n2. Set installation URL (root or subdirectory)\n3. Enter site name, admin username, admin email\n4. Enter database credentials from step 3\n5. Click Install\n\nOr manually: upload WordPress zip to document root, extract, run installer at domain.com/wp-admin/install.php.\n\n## 5. Install SSL\n\ncPanel > Security > SSL/TLS Status:\n1. Select domain\n2. Click \"Run AutoSSL\" (free Let's Encrypt cert)\n3. Wait 1-2 minutes\n4. Verify green padlock\n\nForce HTTPS via `.htaccess`:\n```apache\nRewriteEngine On\nRewriteCond %{HTTPS} off\nRewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\n```\n\n## 6. Configure PHP\n\ncPanel > Software > MultiPHP Manager:\n- Select domain, set PHP 8.1 or 8.2\n\ncPanel > Software > MultiPHP INI Editor:\n\n```\nmax_execution_time = 300\nmax_input_time = 300\nmemory_limit = 256M\npost_max_size = 64M\nupload_max_filesize = 64M\nmax_input_vars = 5000\n```\n\n## 7. Schedule Backups\n\ncPanel > Files > JetBackup (if available):\n- Daily incremental backup\n- Weekly full backup\n- Remote destination: Google Drive or S3\n- Retain 14 days\n\nAlternatively, configure WPvivid inside WordPress for plugin-level backups.\n\n## Email Authentication (SPF, DKIM, DMARC)\n\ncPanel > Email > Email Deliverability:\n1. Click \"Manage\" for domain\n2. Copy DKIM record, add to DNS\n3. Add SPF TXT record: `v=spf1 +a +mx +ip4:SERVER_IP ~all`\n4. Add DMARC TXT at `_dmarc.domain.com`: `v=DMARC1; p=quarantine; rua=mailto:admin@domain.com`\n","html":"<p>Standard cPanel setup sequence for a new WordPress installation.</p>\n<h2>1. Add Domain</h2>\n<p>cPanel > Domains > Addon Domains:</p>\n<ol>\n<li>Enter domain name</li>\n<li>Document root auto-fills (e.g., <code>public_html/domain.com</code>)</li>\n<li>Click \"Add Domain\"</li>\n</ol>\n<h2>2. DNS Records</h2>\n<p>cPanel > Domains > Zone Editor. Minimum required records:</p>\n<p>| Type | Name | Value |\n|------|------|-------|\n| A | @ | Server IP |\n| A | www | Server IP |\n| CNAME | mail | domain.com |\n| MX | @ | mail.domain.com |\n| TXT | @ | v=spf1 +a +mx ~all |</p>\n<p>Allow 15-60 minutes for propagation before proceeding.</p>\n<h2>3. Create MySQL Database</h2>\n<p>cPanel > Databases > MySQL Databases:</p>\n<ol>\n<li>Create database: <code>user_wpdb</code></li>\n<li>Create user: <code>user_wpuser</code> (generate strong password)</li>\n<li>Add user to database with ALL PRIVILEGES</li>\n</ol>\n<p>Note the database name, username, and password — needed during WordPress install.</p>\n<h2>4. Install WordPress</h2>\n<p>Use Softaculous (cPanel > Software > Softaculous):</p>\n<ol>\n<li>Select WordPress</li>\n<li>Set installation URL (root or subdirectory)</li>\n<li>Enter site name, admin username, admin email</li>\n<li>Enter database credentials from step 3</li>\n<li>Click Install</li>\n</ol>\n<p>Or manually: upload WordPress zip to document root, extract, run installer at domain.com/wp-admin/install.php.</p>\n<h2>5. Install SSL</h2>\n<p>cPanel > Security > SSL/TLS Status:</p>\n<ol>\n<li>Select domain</li>\n<li>Click \"Run AutoSSL\" (free Let's Encrypt cert)</li>\n<li>Wait 1-2 minutes</li>\n<li>Verify green padlock</li>\n</ol>\n<p>Force HTTPS via <code>.htaccess</code>:</p>\n<pre><code class=\"language-apache\">RewriteEngine On\nRewriteCond %{HTTPS} off\nRewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\n</code></pre>\n<h2>6. Configure PHP</h2>\n<p>cPanel > Software > MultiPHP Manager:</p>\n<ul>\n<li>Select domain, set PHP 8.1 or 8.2</li>\n</ul>\n<p>cPanel > Software > MultiPHP INI Editor:</p>\n<pre><code>max_execution_time = 300\nmax_input_time = 300\nmemory_limit = 256M\npost_max_size = 64M\nupload_max_filesize = 64M\nmax_input_vars = 5000\n</code></pre>\n<h2>7. Schedule Backups</h2>\n<p>cPanel > Files > JetBackup (if available):</p>\n<ul>\n<li>Daily incremental backup</li>\n<li>Weekly full backup</li>\n<li>Remote destination: Google Drive or S3</li>\n<li>Retain 14 days</li>\n</ul>\n<p>Alternatively, configure WPvivid inside WordPress for plugin-level backups.</p>\n<h2>Email Authentication (SPF, DKIM, DMARC)</h2>\n<p>cPanel > Email > Email Deliverability:</p>\n<ol>\n<li>Click \"Manage\" for domain</li>\n<li>Copy DKIM record, add to DNS</li>\n<li>Add SPF TXT record: <code>v=spf1 +a +mx +ip4:SERVER_IP ~all</code></li>\n<li>Add DMARC TXT at <code>_dmarc.domain.com</code>: <code>v=DMARC1; p=quarantine; rua=mailto:admin@domain.com</code></li>\n</ol>\n"}