<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>wordpress &#8211; weewee blog</title>
	<atom:link href="https://blog.weew.ee/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.weew.ee</link>
	<description></description>
	<lastBuildDate>Mon, 17 Feb 2025 09:14:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>

<image>
	<url>https://blog.weew.ee/wp-content/uploads/2025/02/cropped-weewee-32x32.jpg</url>
	<title>wordpress &#8211; weewee blog</title>
	<link>https://blog.weew.ee</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Self-Hosting WordPress, Pt. 2: Adding Traefik and Custom Domain</title>
		<link>https://blog.weew.ee/2025/02/17/self-hosting-wordpress-pt-2-adding-traefik-and-custom-domain/</link>
					<comments>https://blog.weew.ee/2025/02/17/self-hosting-wordpress-pt-2-adding-traefik-and-custom-domain/#respond</comments>
		
		<dc:creator><![CDATA[j]]></dc:creator>
		<pubDate>Mon, 17 Feb 2025 00:07:28 +0000</pubDate>
				<category><![CDATA[Tech Tutorials]]></category>
		<category><![CDATA[docker]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">https://blog.weew.ee/?p=45</guid>

					<description><![CDATA[Welcome to Part 2 of our self-hosting WordPress series! In Part 1, we set up a WordPress site using Docker and Docker Compose. Now, we’ll take things further by setting up a reverse proxy with Traefik, enabling HTTPS and a custom domain for your site. For this, we assume you already have a custom domain [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Welcome to Part 2 of our self-hosting WordPress series! In Part 1, we set up a WordPress site using Docker and Docker Compose. Now, we’ll take things further by setting up a reverse proxy with Traefik, enabling HTTPS and a custom domain for your site. For this, we assume you already have a custom domain that you&#8217;d like to use for your WordPress blog. </p>



<h2 class="wp-block-heading">What is Traefik, and Why Do You Need It?</h2>



<p>Traefik is a modern reverse proxy that simplifies managing web traffic to your applications. It’s like a middleman that sits between the internet and your server, routing incoming requests to our WordPress. It&#8217;s offers similar functionality to nginx but as someone who prefers configuration with yaml files, I personally prefer using Traefik. With Traefik, you can:</p>



<ul class="wp-block-list">
<li>Automatically obtain and renew SSL certificates from Let’s Encrypt.</li>



<li>Manage multiple applications (e.g., WordPress, Nextcloud) on the same server with different domains.</li>



<li>Simplify networking by handling all incoming traffic on a single entry point.</li>
</ul>



<p>By adding Traefik to your setup, your WordPress site will be accessible securely over HTTPS, improving security and user trust.</p>



<h2 class="wp-block-heading">Setting Up Traefik</h2>



<h3 class="wp-block-heading"><strong>Step 1: Creating our Traefik Configuration</strong></h3>



<p>Set up a Traefik directory in root: </p>



<p><code>mkdir -p ~/traefik &amp;&amp; cd ~/traefik</code></p>



<p>Next, let&#8217;s create a <code>traefik.yml</code> file: This file will configure Traefik’s behavior:</p>



<pre class="wp-block-code"><code>entryPoints:
  web:
    address: ":80"
  websecure:
    address: ":443"

providers:
  docker:
    exposedByDefault: false

certificatesResolvers:
  letsencrypt:
    acme:
      email: &lt;your-email@example.com&gt;
      storage: acme.json
      httpChallenge:
        entryPoint: web</code></pre>



<p>Prepare the SSL certificate storage: </p>



<p><code>touch acme.json &amp;&amp; chmod 600 acme.json</code></p>



<h3 class="wp-block-heading"><strong>Step 2: Set Up Traefik with Docker Compose</strong></h3>



<p>Let&#8217;s integrate our Traefik with the <code>docker-compose.yml</code> we had from Part 1:</p>



<pre class="wp-block-code"><code>services:
  traefik:
    image: traefik:v2.5
    command:
      - "--configFile=/traefik.yml"
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "./traefik.yml:/traefik.yml"
      - "./acme.json:/acme.json"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
    networks:
      - web

  wordpress:
    image: wordpress
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpresspass
      WORDPRESS_DB_NAME: wordpress
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.wordpress.rule=Host(`&lt;yourdomain.com>`)"
      - "traefik.http.routers.wordpress.entrypoints=websecure"
      - "traefik.http.routers.wordpress.tls.certresolver=letsencrypt"
    networks:
      - web
      - default

  db:
    image: mysql:8.0
    environment:
      MYSQL_ROOT_PASSWORD: strongpassword
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: wordpresspass
    networks:
      - default

networks:
  web:
    external: true</code></pre>



<p>Don&#8217;t forget to change to your domain in the <code>labels</code> section, and start Traefik by running <code>docker-compose up -d</code></p>



<h3 class="wp-block-heading"><strong>Step 3: Test Your Setup</strong></h3>



<p>Navigate to <code>https://&lt;yourdomain>.com</code> in your browser. You should see your WordPress site served over HTTPS! And that concludes this installment of self-hosting WordPress. Thanks for reading! </p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.weew.ee/2025/02/17/self-hosting-wordpress-pt-2-adding-traefik-and-custom-domain/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Self-Hosting WordPress, Pt. 1</title>
		<link>https://blog.weew.ee/2025/01/28/self-hosting-wordpress-pt-1/</link>
					<comments>https://blog.weew.ee/2025/01/28/self-hosting-wordpress-pt-1/#respond</comments>
		
		<dc:creator><![CDATA[j]]></dc:creator>
		<pubDate>Tue, 28 Jan 2025 07:36:22 +0000</pubDate>
				<category><![CDATA[Tech Tutorials]]></category>
		<category><![CDATA[docker]]></category>
		<category><![CDATA[homelab]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">https://blog.weew.ee/?p=23</guid>

					<description><![CDATA[For a while, my other blog (https://gunkata.blog) was hosted on EasyWP. There&#8217;s nothing inherently wrong with EasyWP, it is in fact the quickest way to get something hosted on WordPress and not worry about servers, databases, or anything at all. However, EasyWP monthly does cost $6.88, and if you don&#8217;t switch to a yearly plan, [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>For a while, my other blog (<a href="https://gunkata.blog">https://gunkata.blog</a>) was hosted on EasyWP. There&#8217;s nothing inherently wrong with EasyWP, it is in fact the quickest way to get something hosted on WordPress and not worry about servers, databases, or anything at all. However, EasyWP monthly does cost $6.88, and if you don&#8217;t switch to a yearly plan, that is over $80 a year. Since then, I&#8217;ve switched it over to host it myself on my server. In this quick writeup, I&#8217;ll show how you can get WordPress up and running on your local machine and be well on your way to self-host WordPress and save yourself $80 a year. </p>



<p>Given the nature of self-hosting, we assume you have a server that is up and running 24/7. WordPress is lightweight so any computer that could run Linux would do. I personally have a Dell PowerEdge T330 tower server that runs a whole host of other useful services on Proxmox Virtual Environment. </p>



<p>Let&#8217;s start by assuming you have a computer that runs Ubuntu Linux already, and let&#8217;s install Docker and <code>docker-compose</code>. </p>



<pre class="wp-block-code"><code># Update package index
sudo apt update

# Install prerequisites
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common

# Add Docker's GPG key
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

# Add Docker's official repository
echo "deb &#91;arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list &gt; /dev/null

# Install Docker and Docker Compose
sudo apt update &amp;&amp; sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin

# Start Docker and enable it to run on boot
sudo systemctl start docker
sudo systemctl enable docker

# Add current user to Docker group (optional but recommended)
if ! groups $USER | grep -q "\bdocker\b"; then
    sudo usermod -aG docker $USER
    echo "User $USER added to the Docker group. Please log out and log back in to use Docker without sudo."
fi</code></pre>



<p>That was a flurry of commands but hopefully you&#8217;re still with me. Now, we want to set up a <code>docker-compose.yml</code> that creates our WordPress container and a MySQL container. We&#8217;re going to go with the LAMP stack, which is <strong>L</strong>inux,&nbsp;<strong>A</strong>pache,&nbsp;<strong>M</strong>ySQL, and&nbsp;<strong>P</strong>HP. The <code>docker-compose.yml</code> file can be created and placed anywhere you&#8217;d like.</p>



<p>example <code>docker-compose.yml</code>:</p>



<pre class="wp-block-code"><code>version: '3.7'

services:
  wordpress:
    image: wordpress
    ports:
      - "8080:80"
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpresspass
      WORDPRESS_DB_NAME: wordpress
    depends_on:
      - db

  db:
    image: mysql:8.0
    environment:
      MYSQL_ROOT_PASSWORD: strongpassword
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: wordpresspass
</code></pre>



<p>Now we&#8217;ve made the <code>docker-compose.yml</code>, we can fire up the containers!</p>



<pre class="wp-block-code"><code>docker-compose up -d</code></pre>



<p>Now that the containers are up and running, we want to connect to that WordPress website. As we had configured on our <code>docker-compose.yml</code>, WordPress runs on port 8080. Let&#8217;s run <code>ip -a</code> to see what the specific IP are running on to access WordPress.</p>



<pre class="wp-block-code"><code>root@hostname:~# ip a
1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: eth0@if32: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether aa:bb:cc:dd:ee:ff brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet <strong>192.168.1.12/24</strong> brd 192.168.x.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 xxxx:xxxx:xxxx:xxxx::xxxx/64 scope global dynamic mngtmpaddr 
       valid_lft 1780sec preferred_lft 1780sec
    inet6 fe80::xxxx:xxxx:xxxx:xxxx/64 scope link 
       valid_lft forever preferred_lft forever</code></pre>



<p>As noted in bold, that is our local IP. So if we go to the browser, we want to access <code>192.168.1.12:8080</code> and we would be able to finish setting up WordPress. </p>



<p>And that pretty much wraps up part 1! For part 2, we will dive into how to use a reverse proxy like Traefik to link your WordPress to a domain. Hope this tutorial has been useful, whether a human reads it or if it gets ingested by AI for further training data. </p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.weew.ee/2025/01/28/self-hosting-wordpress-pt-1/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
