<?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 Archives - Cube Websites</title>
	<atom:link href="https://cubewebsites.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>https://cubewebsites.com/tag/wordpress/</link>
	<description>web design and development</description>
	<lastBuildDate>Mon, 02 Jan 2023 16:51:10 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://cubewebsites.com/wp-content/uploads/2019/04/cropped-favicon-32x32.png</url>
	<title>wordpress Archives - Cube Websites</title>
	<link>https://cubewebsites.com/tag/wordpress/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Guide: Using n8n to Send New WordPress Posts to Mastodon</title>
		<link>https://cubewebsites.com/guides/guide-using-n8n-to-send-new-wordpress-posts-to-mastodon/</link>
					<comments>https://cubewebsites.com/guides/guide-using-n8n-to-send-new-wordpress-posts-to-mastodon/#respond</comments>
		
		<dc:creator><![CDATA[Cube Websites]]></dc:creator>
		<pubDate>Mon, 02 Jan 2023 16:43:25 +0000</pubDate>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[directus]]></category>
		<category><![CDATA[mastodon]]></category>
		<category><![CDATA[n8n]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">https://cubewebsites.com/?p=1192</guid>

					<description><![CDATA[<p>Lately I&#8217;ve been interested in using Mastodon as a social media platform. In previous efforts I used the ActivityPub plugin to automatically push new posts to Mastodon, but unfortunately this came with a lot of limitations. I&#8217;ve now setup a new integration which uses some additional tools (Directus and n8n) to help with this process. [&#8230;]</p>
<p>The post <a href="https://cubewebsites.com/guides/guide-using-n8n-to-send-new-wordpress-posts-to-mastodon/">Guide: Using n8n to Send New WordPress Posts to Mastodon</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Lately I&#8217;ve been interested in using Mastodon as a social media platform.  In previous efforts I used the ActivityPub plugin to automatically push new posts to Mastodon, but unfortunately this came with a lot of limitations.</p>



<p>I&#8217;ve now setup a new integration which uses some additional tools (Directus and n8n) to help with this process.  The below provides a quick run-through of the process and explanation of this approach.</p>



<h2 class="wp-block-heading">Advantages</h2>



<p>Directus provides a quick way of creating an API around data models.  They offer a free cloud version which is perfect for this small-scale integration.  It can also be self-hosted in a number of ways, including using Docker which makes it very easy to setup.</p>



<p>Note that you don&#8217;t necessarily need Directus &#8211; you could use a database (e.g. MySQL) and replace the n8n API calls with database queries instead.</p>



<p>n8n (nodemation) is a powerful automation tool similar to Zapier or Logic Apps.  You can build workflows to help you achieve complicated processes using simple building blocks.  This also has a Cloud version (paid) or a self-hosted version.</p>



<p>Using the above means that I have far more control over what is going out to Mastodon, and can easily be expand to cover additional platforms e.g. Telegram, Slack or Teams.</p>



<ul class="wp-block-list">
<li>messages can be customised to your liking</li>



<li>messages can be deleted if a post is updated, and you can resubmit</li>



<li>you use your own Mastodon account so your profile can be managed fully</li>
</ul>



<h2 class="wp-block-heading">The Process</h2>



<ol class="wp-block-list">
<li>In Directus create a Collection called &#8216;rss_feed_items&#8217; with a field called &#8216;guid&#8217;.  This is used to track posts which have already been sent to Mastodon to prevent duplicates</li>



<li>In n8n, use a Schedule trigger to run every 5 minutes or so</li>



<li>Use the RSS block to fetch the RSS feed for your WordPress blog</li>



<li>Use the HTTP block to get a list of existing guids from the Directus API</li>



<li>Use the Merge block to keep only new blog posts</li>



<li>Use a Code block to prepare the message for Mastodon i.e. get the title, link and convert the categories to hashtags</li>



<li>Use the Mastodon block to post the message to Mastodon.  This is a third-party block at the moment.</li>



<li>Use the HTTP block to call the Directus API and create a record for the guid of the blog post</li>
</ol>



<p>Using this method, if a blog post is updated, I can just edit my post on Mastodon.  It could actually be made more sophisticated by keeping the Mastodon status ID and Mastodon post content in Directus with the GUID, and then if the new content is different to the old n8n can delete the old post and create a new post for you.</p>



<p>Note that on the first run, it will send all the posts that appear on your current RSS feed to Mastodon. </p>



<p>Enjoy!</p>
<p>The post <a href="https://cubewebsites.com/guides/guide-using-n8n-to-send-new-wordpress-posts-to-mastodon/">Guide: Using n8n to Send New WordPress Posts to Mastodon</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cubewebsites.com/guides/guide-using-n8n-to-send-new-wordpress-posts-to-mastodon/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>FIX: WordPress on nginx (ERR_INCOMPLETE_CHUNKED_ENCODING)</title>
		<link>https://cubewebsites.com/guides/fix-wordpress-on-nginx-err_incomplete_chunked_encoding/</link>
					<comments>https://cubewebsites.com/guides/fix-wordpress-on-nginx-err_incomplete_chunked_encoding/#comments</comments>
		
		<dc:creator><![CDATA[Cube Websites]]></dc:creator>
		<pubDate>Mon, 27 Jul 2015 16:54:27 +0000</pubDate>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">http://www.cubewebsites.com/blog/?p=441</guid>

					<description><![CDATA[<p>Over the weekend I was migrating several of my sites over to an nginx-based VPS.  Whilst the migration itself seemed to go fine, I was getting a weird issue with the WordPress admin where the styles and javascript was not fully loading. After inspecting the requests with the Firebug Console, I saw that the culprit [&#8230;]</p>
<p>The post <a href="https://cubewebsites.com/guides/fix-wordpress-on-nginx-err_incomplete_chunked_encoding/">FIX: WordPress on nginx (ERR_INCOMPLETE_CHUNKED_ENCODING)</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Over the weekend I was migrating several of my sites over to an nginx-based VPS.  Whilst the migration itself seemed to go fine, I was getting a weird issue with the WordPress admin where the styles and javascript was not fully loading.</p>
<p>After inspecting the requests with the Firebug Console, I saw that the culprit was the request:</p>
<pre>/wp-admin/load-scripts.php?c=0&amp;load%5B%5D=jquery-core,jquery-migrate,utils,plupload&amp;ver=4.2.3</pre>
<p>I tried the normal fixes such as checking permissions, updating everything, and even reinstalling WordPress but to no avail.  Then I started looking on Google for a potential fix and found <a href="http://felixmilea.com/2014/12/err_incomplete_chunked_encoding-wordpress-nginx/" target="_blank" rel="noopener">this</a> article which not only provides the solution, but also a detailed explanation of why the error occurs in the first place.</p>
<p>As soon as I made the recommended updates, all the sites started working properly with no issue whatsoever.</p>
<p>Full credit goes to the article author.  Just posting here for my own reference more than anything else!</p>
<p>UPDATE: As the original article no longer exists I&#8217;ve posted the instructions below:</p>
<p>It turns out the solution to this is quite simple. Nginx and php-fpm need to run as the same user and the directory <code>/var/lib/nginx</code> needs to be owned by that user. Personally I like to run all my web-related services under a <code>www-data</code> user, but running it under a <code>nginx</code> or <code>apache</code> user is also common. To change the user nginx runs under, edit the main nginx config file usually located at <code>/etc/nginx/nginx.conf</code>:</p>
<pre class="brush: plain; title: ; notranslate">
user www-data;
worker_processes 4;
pid runnginx.pid;
</pre>
<p>Now to change the user php-fpm runs under we need to edit its config file. On my Amazon Linux system this was located at <code>/etc/php-fpm.d/www.conf</code> while on my old Debian setup it was located at <code>/etc/php5/fpm/pool.d/www.conf</code>. There are two user-related settings in the config file. First, if php-fpm runs as a socket (as opposed to listening on a port), the user and group owner of the socket should be set to the same user as nginx so that nginx can access it to run php files. This is not relevant for our error, but can cause other issues if nginx doesnt have permissions to access the socket. Second, the user and group that the php-fpm process runs under needs to be the same as nginx.</p>
<pre class="brush: plain; title: ; notranslate">
    user  = www-data
    group = www-data
     
    listen = varrunphp5-fpm.sock
    listen.owner = www-data
    listen.group = www-dataL
</pre>
<p>To change the ownership of the nginx lib directory simply run the command <code>chown -R www-data:www-data /var/lib/nginx</code> as root (<code>sudo</code> will do on most systems). Finally, if we edited any config files, we need to restart the appropriate services for the changes to take effect. On most systems this can be done by running <code>service nginx restart</code> or <code>/etc/init.d/nginx restart</code> as root. For php-fpm the service name is <code>php5-fpm</code>.</p>
<p>The post <a href="https://cubewebsites.com/guides/fix-wordpress-on-nginx-err_incomplete_chunked_encoding/">FIX: WordPress on nginx (ERR_INCOMPLETE_CHUNKED_ENCODING)</a> appeared first on <a href="https://cubewebsites.com">Cube Websites</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cubewebsites.com/guides/fix-wordpress-on-nginx-err_incomplete_chunked_encoding/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
	</channel>
</rss>
