{"id":6,"date":"2025-05-27T02:15:52","date_gmt":"2025-05-27T02:15:52","guid":{"rendered":"https:\/\/las.zeddal.com\/?p=6"},"modified":"2025-05-27T02:15:52","modified_gmt":"2025-05-27T02:15:52","slug":"how-i-installed-wordpress-on-my-own-server","status":"publish","type":"post","link":"https:\/\/las.zeddal.com\/?p=6","title":{"rendered":"How I Installed WordPress on My Own Server"},"content":{"rendered":"\n<p>Today, I successfully installed WordPress on my own server! In this post, I want to walk through the steps I followed, so that anyone else can do the same (and so I can remember how I did it next time).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Choosing the Stack<\/strong><\/h3>\n\n\n\n<p>I decided to use <strong>Nginx<\/strong> as my web server, <strong>PHP<\/strong> for processing, and <strong>MySQL<\/strong> for my database. My goal was to install WordPress at <code>\/var\/www\/wordpress<\/code> and manage everything myself.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Downloading and Extracting WordPress<\/strong><\/h3>\n\n\n\n<p>First, I downloaded the latest WordPress package and moved it to my web directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/tmp\nwget https:\/\/wordpress.org\/latest.tar.gz\ntar -xzvf latest.tar.gz\nsudo mv wordpress \/var\/www\/\nsudo chown -R www-data:www-data \/var\/www\/wordpress\nsudo find \/var\/www\/wordpress -type d -exec chmod 755 {} \\;\nsudo find \/var\/www\/wordpress -type f -exec chmod 644 {} \\;\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Setting Up MySQL<\/strong><\/h3>\n\n\n\n<p>I then set up a new MySQL database and user just for WordPress:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\nCREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'my-strong-password';\nGRANT ALL PRIVILEGES ON wordpress.* TO 'wordpressuser'@'localhost';\nFLUSH PRIVILEGES;\n<\/code><\/pre>\n\n\n\n<p><em>(I replaced <code>my-strong-password<\/code> with a real password!)<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3: Configuring WordPress<\/strong><\/h3>\n\n\n\n<p>I copied the sample configuration file and updated it with my database info:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/var\/www\/wordpress\ncp wp-config-sample.php wp-config.php\n<\/code><\/pre>\n\n\n\n<p>Then, I edited <code>wp-config.php<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define('DB_NAME', 'wordpress');\ndefine('DB_USER', 'wordpressuser');\ndefine('DB_PASSWORD', 'my-strong-password');\ndefine('DB_HOST', 'localhost');\ndefine('DB_CHARSET', 'utf8mb4');\ndefine('DB_COLLATE', '');\n<\/code><\/pre>\n\n\n\n<p>I also generated unique keys and salts for extra security.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 4: Updating My Nginx Configuration<\/strong><\/h3>\n\n\n\n<p>I needed to point Nginx to the new WordPress directory and make sure it worked with PHP. Here\u2019s the relevant part of my Nginx config:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server {\n    root \/var\/www\/wordpress;\n    index index.php index.html index.htm;\n    server_name las.zeddal.com;\n\n    location \/ {\n        try_files $uri $uri\/ \/index.php?$args;\n    }\n\n    location ~ \\.php$ {\n        include snippets\/fastcgi-php.conf;\n        fastcgi_pass unix:\/run\/php\/php8.3-fpm.sock;\n    }\n\n    # SSL and other configs...\n}\n<\/code><\/pre>\n\n\n\n<p>After editing, I reloaded Nginx:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nginx -t\nsudo systemctl reload nginx\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 5: Running the WordPress Installer<\/strong><\/h3>\n\n\n\n<p>Finally, I visited <a href=\"https:\/\/las.zeddal.com\/\">my website<\/a> in a browser. The WordPress setup wizard appeared! I filled in the site title, admin account, and I was done.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>Installing WordPress manually gave me a lot of control and a better understanding of how everything works behind the scenes. If you\u2019re interested in running your own WordPress site, I hope this guide helps.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today, I successfully installed WordPress on my own server! In this post, I want to walk through the steps I followed, so that anyone else can do the same (and so I can remember how I did it next time). Choosing the Stack I decided to use Nginx as my web server, PHP for processing, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/las.zeddal.com\/index.php?rest_route=\/wp\/v2\/posts\/6","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/las.zeddal.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/las.zeddal.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/las.zeddal.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/las.zeddal.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6"}],"version-history":[{"count":1,"href":"https:\/\/las.zeddal.com\/index.php?rest_route=\/wp\/v2\/posts\/6\/revisions"}],"predecessor-version":[{"id":8,"href":"https:\/\/las.zeddal.com\/index.php?rest_route=\/wp\/v2\/posts\/6\/revisions\/8"}],"wp:attachment":[{"href":"https:\/\/las.zeddal.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/las.zeddal.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/las.zeddal.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}