{"id":19879763,"url":"https://github.com/spieglt/how-to-actually-set-up-wordpress","last_synced_at":"2026-03-19T12:09:11.086Z","repository":{"id":94934108,"uuid":"287643402","full_name":"spieglt/how-to-actually-set-up-wordpress","owner":"spieglt","description":"\"Because every guide I found was wrong\"","archived":false,"fork":false,"pushed_at":"2020-08-14T23:39:25.000Z","size":3,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T06:18:40.828Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spieglt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-14T23:33:48.000Z","updated_at":"2022-10-15T22:31:15.000Z","dependencies_parsed_at":"2023-03-12T01:31:31.981Z","dependency_job_id":null,"html_url":"https://github.com/spieglt/how-to-actually-set-up-wordpress","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spieglt/how-to-actually-set-up-wordpress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spieglt%2Fhow-to-actually-set-up-wordpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spieglt%2Fhow-to-actually-set-up-wordpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spieglt%2Fhow-to-actually-set-up-wordpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spieglt%2Fhow-to-actually-set-up-wordpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spieglt","download_url":"https://codeload.github.com/spieglt/how-to-actually-set-up-wordpress/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spieglt%2Fhow-to-actually-set-up-wordpress/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30085815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T15:40:14.053Z","status":"ssl_error","status_checked_at":"2026-03-04T15:40:13.655Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T17:09:22.525Z","updated_at":"2026-03-04T16:01:59.896Z","avatar_url":"https://github.com/spieglt.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to actually set up WordPress on Ubuntu 20 on EC2\n1. Launch an EC2 instance with Ubuntu, set up your ssh config, security group, etc. making sure TCP 80, 443, and 22 are exposed.\n2. Get an ENI and associate it with the instance, make a DNS A record pointing to it.\n3. `ssh -i yourkey.pem ubuntu@yourdomainname.com`\n4. Change hostname, install dependencies, enable services after reboot:\n```\nsudo nano /etc/hostname [edit this to match your domain name]\nsudo apt update\nsudo apt install mysql-server mysql-client libapache2-mod-php php-cli php-cgi php-mysql php-gd php-bcmath php-curl php-imagick php-mbstring certbot python3-certbot-apache\nsudo systemctl enable mysql\nsudo systemctl enable apache2\n```\n\n5. `sudo mysql_secure_installation`, select the recommended defaults.\n6. `sudo mysql -u root`, then in MySQL:\n```\ncreate database wordpress;\ncreate user 'wordpress'@'localhost' identified by 'goodpasswordherethatyouwilluseinwp-config.php';\ngrant all privileges on wordpress.* to wordpress;\nflush privileges;\nexit;\n```\n7. Download/extract/configure WordPress:\n```\ncd ~; wget https://wordpress.org/latest.tar.gz\ntar -xzf latest.tar.gz \ncd wordpress/\nmv wp-config-sample.php wp-config.php\nnano wp-config.php \n\n    - edit DB connection and auth/nonce/salt sections, using link in there for easily-generated values\n\n    - add/edit these lines:\n        define( 'WP_DEBUG', true );\n        define( 'WP_HTTP_BLOCK_EXTERNAL', false );\n        define( 'WP_ACCESSIBLE_HOSTS', 'api.wordpress.org' );\n```\n\n8. Move WordPress to its new home and set permissions\n```\nsudo rm /var/www/html/index.html\nsudo cp -r ~/wordpress/* /var/www/html\nsudo chown -R www-data:www-data /var/www/html/*\nsudo service apache2 restart\n```\n9. Set up HTTPS\n```\nsudo apt install certbot\nsudo certbot --apache -d yourdomainname.com -d www.yourdomainname.com\n\n    - change `upload_max_filesize` to `1G` in\n        /etc/php/[version]/apache2/php.ini\n        /etc/php/[version]/cgi/php.ini\n\nsudo service apache2 restart\n```\n10. Edit these two files by uncommenting the `ServerName` directive and replacing the example with your domain name and adding a `www` alias which will be redirected to the bare domain:\n```\n/etc/apache2/sites-available/000-default.conf\n/etc/apache2/sites-available/000-default-le-ssl.conf\n\n    ServerName yourdomainname.com\n    ServerAlias www.yourdomainname.com\n```\nthen edit `/etc/apache2/apache2.conf`, find the block that starts `\u003cDirectory /var/www/\u003e`, and change the line inside from `AllowOverride None` to `AllowOverride All`.\n\n12. Set up weekly patches and monthly cert renewals with `sudo crontab -e` and adding these lines to the bottom:\n```\n10 0  1 * * certbot renew --force-renewal\n20 0  * * 1 apt update \u0026\u0026 apt upgrade -y\n```\n\n13. Go to yourdomainname.com/wp-admin and set up WordPress. At some point in there, go to Settings-\u003ePermalinks and change \"Common Settings\" to \"Post name\" (to take out the `/index.php/` on every page). Then in your ssh session, `sudo nano /var/www/html/.htaccess` and add contents:\n```\n\u003cIfModule mod_rewrite.c\u003e\n    RewriteEngine On\n    RewriteBase /\n    RewriteRule ^index\\.php$ - [L]\n    RewriteCond %{REQUEST_FILENAME} !-f\n    RewriteCond %{REQUEST_FILENAME} !-d\n    RewriteRule . /index.php [L]\n\u003c/IfModule\u003e\n```\n\n14. Later, once everything's working, go back into `/var/www/html/wp-config.php` and change the line to be `define( 'WP_DEBUG', false );`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspieglt%2Fhow-to-actually-set-up-wordpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspieglt%2Fhow-to-actually-set-up-wordpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspieglt%2Fhow-to-actually-set-up-wordpress/lists"}