<?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>Gravyware&#039;s Blog</title>
	<atom:link href="https://blog.gravyware.com/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.gravyware.com</link>
	<description>The best tech and startup info updated daily</description>
	<lastBuildDate>Sun, 19 Apr 2026 18:44:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://blog.gravyware.com/wp-content/uploads/2023/01/apple-touch-icon-150x150.png</url>
	<title>Gravyware&#039;s Blog</title>
	<link>https://blog.gravyware.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Create a Page With a Custom URL in WordPress</title>
		<link>https://blog.gravyware.com/hobart/custom-page-url-in-wordpress</link>
		
		<dc:creator><![CDATA[David Garthe]]></dc:creator>
		<pubDate>Thu, 29 Aug 2024 20:47:12 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<guid isPermaLink="false">https://blog.gravyware.com/?p=3467</guid>

					<description><![CDATA[As a WordPress developer, you may often encounter situations where you need to create a page with a custom URL in WordPress for your theme.]]></description>
										<content:encoded><![CDATA[
<p>As a WordPress developer, some things are not straightforward. You may often encounter situations where you need to create a page with a custom URL in WordPress for your theme.</p>



<p>An example would be for a user profile page where the URL includes the <strong>user_nicename</strong> value instead of a user_id?</p>



<p>Let&#8217;s walk through the process of creating a custom page URL like <strong>https://xyz.com/user/johndoe</strong>, where &#8220;johndoe&#8221; is the user&#8217;s user_nicename value. This can be particularly useful for user profile pages or custom post types.</p>



<h2 class="wp-block-heading">Step 1: Add a Custom Rewrite Rule</h2>



<p>First, we need to add a custom rewrite rule to WordPress. This rule will tell WordPress how to handle our custom URL structure. Add the following code to your theme&#8217;s <strong>functions.php</strong> file:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>function add_custom_rewrite_rule() {
    add_rewrite_rule('^user/(&#91;^/&#93;*)/?','index.php?pagename=user&amp;user=$matches&#91;1&#93;', 'top');
    add_rewrite_tag('%user%', '(&#91;^&amp;&#93;+)');
}
add_action('init', 'add_custom_rewrite_rule', 10, 0);</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #3E8FB0">function</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">add_custom_rewrite_rule</span><span style="color: #908CAA">()</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #EA9A97">add_rewrite_rule</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;^user/(&#91;^/&#93;*)/?&#39;</span><span style="color: #908CAA">,</span><span style="color: #F6C177">&#39;index.php?pagename=user&amp;user=$matches&#91;1&#93;&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;top&#39;</span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #EA9A97">add_rewrite_tag</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;%user%&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;(&#91;^&amp;&#93;+)&#39;</span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #EA9A97">add_action</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;init&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;add_custom_rewrite_rule&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">10</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">0</span><span style="color: #908CAA">);</span></span></code></pre></div>



<p>This rule tells WordPress to match URLs like <strong>/user/johndoe</strong> and internally rewrite them to <strong>index.php?pagename=user-profile&amp;user_slug=johndoe</strong>.</p>



<h2 class="wp-block-heading">Step 2: Add Custom Query Vars</h2>



<p>Next, we need to tell WordPress about our custom query variable user_slug. Add this code to your <strong>functions.php</strong>:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>function add_custom_query_vars($query_vars) {
    $query_vars[] = 'user';
    return $query_vars;
}
add_filter('query_vars', 'add_custom_query_vars');</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #3E8FB0">function</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">add_custom_query_vars</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">query_vars</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">query_vars</span><span style="color: #908CAA">[]</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;user&#39;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">return</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">query_vars</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #EA9A97">add_filter</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;query_vars&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;add_custom_query_vars&#39;</span><span style="color: #908CAA">);</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 3: Create a Custom Page Template</h2>



<p>Now, create a new file in your theme directory called <strong>page-user-profile.php</strong>. This will be the template for your user profile pages. Here&#8217;s a basic example:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>&lt;?php
/*
Template Name: User Profile
*/

get_header();

$user_slug = get_query_var('user');
$user = get_user_by('slug', $user_slug);

if ($user) {
    // Display user profile information
    echo '&lt;h1>' . esc_html($user->display_name) . '&lt;/h1>';
    echo '&lt;p>Email: ' . esc_html($user->user_email) . '&lt;/p>';
    // Add more user information as needed
} else {
    echo '&lt;p>User not found.&lt;/p>';
}

get_footer();</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #3E8FB0">&lt;?php</span></span>
<span class="line"><span style="color: #908CAA; font-style: italic">/*</span></span>
<span class="line"><span style="color: #6E6A86; font-style: italic">Template Name: User Profile</span></span>
<span class="line"><span style="color: #908CAA; font-style: italic">*/</span></span>
<span class="line"></span>
<span class="line"><span style="color: #EA9A97">get_header</span><span style="color: #908CAA">();</span></span>
<span class="line"></span>
<span class="line"><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">user_slug</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">get_query_var</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;user&#39;</span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">user</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">get_user_by</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;slug&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">user_slug</span><span style="color: #908CAA">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">user</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Display user profile information</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #EB6F92; font-style: italic">echo</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;&lt;h1&gt;&#39;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">.</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">esc_html</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">user</span><span style="color: #3E8FB0">-&gt;</span><span style="color: #E0DEF4; font-style: italic">display_name</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">.</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;&lt;/h1&gt;&#39;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #EB6F92; font-style: italic">echo</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;&lt;p&gt;Email: &#39;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">.</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">esc_html</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">user</span><span style="color: #3E8FB0">-&gt;</span><span style="color: #E0DEF4; font-style: italic">user_email</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">.</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;&lt;/p&gt;&#39;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Add more user information as needed</span></span>
<span class="line"><span style="color: #908CAA">}</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">else</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #EB6F92; font-style: italic">echo</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;&lt;p&gt;User not found.&lt;/p&gt;&#39;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #908CAA">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #EA9A97">get_footer</span><span style="color: #908CAA">();</span></span></code></pre></div>



<h2 class="wp-block-heading">Step 4: Create a WordPress Page</h2>



<p>In the WordPress admin panel, create a new page and title it &#8220;User Profile&#8221;. Set the template to the new page you just uploaded, and set the permalink value to &#8220;<strong>user</strong>&#8220;. This page won&#8217;t be directly accessible, but it&#8217;s necessary for our rewrite rule to work.</p>



<h2 class="wp-block-heading">Step 5: Flush Rewrite Rules</h2>



<p>After making these changes, you need to flush the rewrite rules. You can do this by going to <strong>Settings &gt; Permalinks</strong> in the WordPress admin panel and clicking &#8220;Save Changes&#8221; without making any changes.</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="800" height="533" src="https://blog.gravyware.com/wp-content/uploads/2024/08/wordpress-typed-on-typewriter.jpg" alt="custom url in wordpress - wordpress typed on a typewriter" class="wp-image-3476" srcset="https://blog.gravyware.com/wp-content/uploads/2024/08/wordpress-typed-on-typewriter.jpg 800w, https://blog.gravyware.com/wp-content/uploads/2024/08/wordpress-typed-on-typewriter-300x200.jpg 300w, https://blog.gravyware.com/wp-content/uploads/2024/08/wordpress-typed-on-typewriter-768x512.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<h2 class="wp-block-heading">Step 6: Link to User Profiles</h2>



<p>Now you can link to user profiles using the custom URL structure. For example:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$user = get_user_by('id', 1);

$profile_url = home_url("/user/{$user->user_nicename}/");

echo '&lt;a href="' . esc_url($profile_url) . '">View Profile&lt;/a>';</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">user</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">get_user_by</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;id&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">1</span><span style="color: #908CAA">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">profile_url</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">home_url</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&quot;/user/</span><span style="color: #908CAA">{</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">user</span><span style="color: #3E8FB0">-&gt;</span><span style="color: #E0DEF4; font-style: italic">user_nicename</span><span style="color: #908CAA">}</span><span style="color: #F6C177">/&quot;</span><span style="color: #908CAA">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #EB6F92; font-style: italic">echo</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;&lt;a href=&quot;&#39;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">.</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">esc_url</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">profile_url</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">.</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;&quot;&gt;View Profile&lt;/a&gt;&#39;</span><span style="color: #908CAA">;</span></span></code></pre></div>



<p>This should create a link to whichever user has a user ID value of &#8220;1&#8221;.</p>



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



<p>Congrats! You&#8217;ve successfully created a custom page URL structure for user profiles in WordPress. This technique can be adapted for other custom URL structures as well, such as for custom post types or other specialized pages.</p>



<p>Remember to always sanitize and escape data when working with user input and URLs to ensure the security of your WordPress site.</p>



<p>Good luck!</p>



<p></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Validate and Sanitize WordPress Secure Form Inputs</title>
		<link>https://blog.gravyware.com/validate-and-sanitize-wordpress-secure-form</link>
		
		<dc:creator><![CDATA[David Garthe]]></dc:creator>
		<pubDate>Mon, 19 Aug 2024 00:43:59 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<guid isPermaLink="false">https://blog.gravyware.com/?p=3450</guid>

					<description><![CDATA[Are you ready to dive into the world of WordPress secure form handling? Let's journey through the land of validation and sanitization!]]></description>
										<content:encoded><![CDATA[
<p>Are you ready to dive into the world of WordPress secure form handling? Buckle up, because we&#8217;re about to embark on an exciting journey through the land of validation and sanitization! </p>



<div class="wp-block-rank-math-toc-block has-theme-palette-7-background-color has-background" style="padding-top:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--40)" id="rank-math-toc"><h2>Table of Contents</h2><nav><ul><li><a href="#the-shocking-truth-about-word-press-secure-form-security">The Shocking Truth About WordPress Secure Form Security</a></li><li><a href="#why-should-you-care-about-input-validation-and-sanitization">Why Should You Care About Input Validation and Sanitization?</a><ul><li><a href="#the-dynamic-duo-of-form-security">The Dynamic Duo of Form Security</a></li><li><a href="#the-risks-of-skipping-security">The Risks of Skipping Security</a></li></ul></li><li><a href="#setting-up-your-word-press-form-handling-fortress">Setting Up Your WordPress Form-Handling Fortress</a><ul><li><a href="#the-tools-of-the-trade">The Tools of the Trade</a></li><li><a href="#creating-your-custom-form-handling-plugin">Creating Your Custom Form-Handling Plugin</a></li></ul></li><li><a href="#basic-php-validation-techniques-your-first-line-of-defense">Basic PHP Validation Techniques: Your First Line of Defense</a><ul><li><a href="#the-power-of-ph-ps-built-in-functions">The Power of PHP&#8217;s Built-in Functions</a></li><li><a href="#crafting-custom-validation-rules">Crafting Custom Validation Rules</a></li></ul></li><li><a href="#advanced-validation-strategies-leveling-up-your-form-game">Advanced Validation Strategies: Leveling Up Your Form Game</a><ul><li><a href="#real-time-validation-with-ajax">Real-time Validation with AJAX</a></li><li><a href="#handling-file-uploads-like-a-pro">Handling File Uploads Like a Pro</a></li></ul></li><li><a href="#sanitization-cleaning-up-the-riffraff">Sanitization: Cleaning Up the Riffraff</a><ul><li><a href="#word-press-sanitization-functions-your-new-best-friends">WordPress Sanitization Functions: Your New Best Friends</a></li><li><a href="#creating-custom-sanitization-methods">Creating Custom Sanitization Methods</a></li></ul></li><li><a href="#putting-it-all-together-a-complete-form-processing-example">Putting It All Together: A Complete Form Processing Example</a></li><li><a href="#wrapping-up-youre-now-a-form-security-ninja">Wrapping Up: You&#8217;re Now a Form Security Ninja!</a></li></ul></nav></div>



<h2 class="wp-block-heading" id="the-shocking-truth-about-word-press-secure-form-security">The Shocking Truth About WordPress Secure Form Security</h2>



<p>Let&#8217;s kick things off with a jaw-dropping statistic: Did you know that a whopping <a href="https://www.accenture.com/us-en/insights/cyber-security-index" target="_blank" rel="noreferrer noopener">43% of cyberattacks target small businesses</a>, with many of these attacks exploiting vulnerabilities in web forms?</p>



<p>As a WordPress developer, you&#8217;re not just building websites – you have to create a digital fortress as well. And one of the <strong>most crucial battlegrounds</strong> in this cybersecurity war is the <strong>humble web form</strong>. Those innocent-looking input fields can be a hacker&#8217;s playground if left unchecked.</p>



<p>By the end of this guide, you&#8217;ll be armed with the knowledge and skills to turn your WordPress forms into impenetrable barriers against malicious inputs.</p>



<h2 class="wp-block-heading" id="why-should-you-care-about-input-validation-and-sanitization">Why Should You Care About Input Validation and Sanitization?</h2>



<p>Before we dive into the nitty-gritty, let&#8217;s take a moment to understand why we&#8217;re even bothering with all this validation and sanitization stuff.</p>



<h3 class="wp-block-heading" id="the-dynamic-duo-of-form-security">The Dynamic Duo of Form Security</h3>



<ul class="wp-block-list">
<li><strong>Input Validation</strong>: Think of this as your bouncer at the club door. It checks if the data entering your form meets your criteria. Is that email address actually an email address? Is that phone number made up of digits only? Validation says, &#8220;Hey you! Yeah, you with the weird input. You&#8217;re not getting in here!&#8221; This is primarily handled with JavaScript.<br></li>



<li><strong>Input Sanitization</strong>: This is like your form&#8217;s personal hygienist. Once data passes validation, sanitization cleans it up. It removes or encodes potentially harmful characters, ensuring that even if something sneaky slips through validation, it can&#8217;t wreak havoc on your system. This is primarily handled with PHP.</li>
</ul>



<h3 class="wp-block-heading" id="the-risks-of-skipping-security">The Risks of Skipping Security</h3>



<figure class="wp-block-image size-full"><img decoding="async" width="800" height="550" src="https://blog.gravyware.com/wp-content/uploads/2024/08/bad-character.jpg" alt="wordpress secure form hacker covering his face" class="wp-image-3461" srcset="https://blog.gravyware.com/wp-content/uploads/2024/08/bad-character.jpg 800w, https://blog.gravyware.com/wp-content/uploads/2024/08/bad-character-300x206.jpg 300w, https://blog.gravyware.com/wp-content/uploads/2024/08/bad-character-768x528.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>Ignoring form security is like leaving your front door wide open in a neighborhood full of mischievous cats. While most visitors might be harmless, eventually one curious feline to knock over your prized vase. In the digital world, these &#8220;cats&#8221; come in the form of:</p>



<ul class="wp-block-list">
<li>SQL Injection attacks</li>



<li>Cross-Site Scripting (XSS)</li>



<li>Remote Code Execution</li>



<li>Data corruption</li>
</ul>



<p>Trust me, dealing with any of these is way less fun than cleaning up after a cat party. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f431.png" alt="🐱" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<h2 class="wp-block-heading" id="setting-up-your-word-press-form-handling-fortress">Setting Up Your WordPress Form-Handling Fortress</h2>



<p>First, we need to set up our WordPress development environment.</p>



<h3 class="wp-block-heading" id="the-tools-of-the-trade">The Tools of the Trade</h3>



<ol class="wp-block-list">
<li><strong>WordPress</strong>: Make sure you&#8217;re running the latest version.</li>



<li><strong>A code editor</strong>: I&#8217;m partial to <a href="https://www.jetbrains.com/phpstorm/" target="_blank" rel="noreferrer noopener nofollow">PHPStorm</a> or <a href="https://code.visualstudio.com" target="_blank" rel="noreferrer noopener nofollow">VSCode</a>, but use whatever makes your coding heart sing.</li>



<li><strong>A local development environment</strong>: Tools like Local by Flywheel or XAMPP are great for this.</li>



<li><strong>WordPress Debug Mode</strong>: Turn this on in your <strong>wp-config.php</strong> file. It&#8217;s like having a super-smart sidekick pointing out your mistakes. <a href="https://rankmath.com/blog/enable-debugging-in-wordpress/" target="_blank" rel="noreferrer noopener nofollow">Here&#8217;s one way</a>.</li>
</ol>



<h3 class="wp-block-heading" id="creating-your-custom-form-handling-plugin">Creating Your Custom Form-Handling Plugin</h3>



<p>Why a plugin? Because it keeps your functionality separate from your theme, making it portable and easier to maintain. Plus, it makes you feel like a real WordPress wizard. </p>



<p>Here&#8217;s a basic structure to get you started:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>&lt;?php
/**
 * Plugin Name: SuperSecure Form Handler
 * Description: Handles form inputs like a boss!
 * Version: 1.0
 * Author: Your Awesome Name
 */

if (!defined('ABSPATH')) exit; // Exit if accessed directly

class SuperSecureFormHandler {
    public function __construct() {
        add_action('init', array($this, 'init'));
    }

    public function init() {
        // We'll add our form handling magic here
    }
}

new SuperSecureFormHandler();</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #3E8FB0">&lt;?php</span></span>
<span class="line"><span style="color: #908CAA; font-style: italic">/**</span></span>
<span class="line"><span style="color: #6E6A86; font-style: italic"> * Plugin Name: SuperSecure Form Handler</span></span>
<span class="line"><span style="color: #6E6A86; font-style: italic"> * Description: Handles form inputs like a boss!</span></span>
<span class="line"><span style="color: #6E6A86; font-style: italic"> * Version: 1.0</span></span>
<span class="line"><span style="color: #6E6A86; font-style: italic"> * Author: Your Awesome Name</span></span>
<span class="line"><span style="color: #6E6A86; font-style: italic"> </span><span style="color: #908CAA; font-style: italic">*/</span></span>
<span class="line"></span>
<span class="line"><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #3E8FB0">!</span><span style="color: #EB6F92; font-style: italic">defined</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;ABSPATH&#39;</span><span style="color: #908CAA">))</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">exit</span><span style="color: #908CAA">;</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Exit if accessed directly</span></span>
<span class="line"></span>
<span class="line"><span style="color: #3E8FB0">class</span><span style="color: #E0DEF4"> </span><span style="color: #9CCFD8">SuperSecureFormHandler</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">public</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">function</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">__construct</span><span style="color: #908CAA">()</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #EA9A97">add_action</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;init&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">array</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">this</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;init&#39;</span><span style="color: #908CAA">));</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">public</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">function</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">init</span><span style="color: #908CAA">()</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #908CAA">        </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> We&#39;ll add our form handling magic here</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #908CAA">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #3E8FB0">new</span><span style="color: #E0DEF4"> </span><span style="color: #9CCFD8">SuperSecureFormHandler</span><span style="color: #908CAA">();</span></span></code></pre></div>



<h2 class="wp-block-heading" id="basic-php-validation-techniques-your-first-line-of-defense">Basic PHP Validation Techniques: Your First Line of Defense</h2>



<p>Now that we&#8217;ve got our plugin set up, let&#8217;s start with some basic validation techniques. Think of these as the foundation of your fortress – not flashy, but absolutely essential.</p>



<h3 class="wp-block-heading" id="the-power-of-ph-ps-built-in-functions">The Power of PHP&#8217;s Built-in Functions</h3>



<p>PHP comes with a treasure trove of basic validation functions. Here are some of my favorites:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>// Is it an email?
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
    $errors[] = "Invalid email format";
}

// Is it a number?
if (!is_numeric($age)) {
    $errors[] = "Age must be a number";
}

// Is it within a range?
if ($age &lt; 18 || $age > 99) {
    $errors[] = "Age must be between 18 and 99";
}

// Is it not empty?
if (empty($name)) {
    $errors[] = "Name is required";
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Is it an email?</span></span>
<span class="line"><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #3E8FB0">!</span><span style="color: #EB6F92; font-style: italic">filter_var</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">email</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">FILTER_VALIDATE_EMAIL</span><span style="color: #908CAA">))</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">errors</span><span style="color: #908CAA">[]</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;Invalid email format&quot;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #908CAA">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Is it a number?</span></span>
<span class="line"><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #3E8FB0">!</span><span style="color: #EB6F92; font-style: italic">is_numeric</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">age</span><span style="color: #908CAA">))</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">errors</span><span style="color: #908CAA">[]</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;Age must be a number&quot;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #908CAA">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Is it within a range?</span></span>
<span class="line"><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">age</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">&lt;</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">18</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">||</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">age</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">99</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">errors</span><span style="color: #908CAA">[]</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;Age must be between 18 and 99&quot;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #908CAA">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Is it not empty?</span></span>
<span class="line"><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #EB6F92; font-style: italic">empty</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">name</span><span style="color: #908CAA">))</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">errors</span><span style="color: #908CAA">[]</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;Name is required&quot;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #908CAA">}</span></span></code></pre></div>



<h3 class="wp-block-heading" id="crafting-custom-validation-rules">Crafting Custom Validation Rules</h3>



<p>Sometimes, the built-in functions just won&#8217;t cut it. That&#8217;s when you need to roll up your sleeves and create custom validation rules. Here&#8217;s an example of validating a username:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>function validate_username($username) {
    // Only allow alphanumeric characters and underscores
    if (!preg_match('/^&#91;a-zA-Z0-9_&#93;+$/', $username)) {
        return false;
    }
    
    // Username should be between 4 and 20 characters
    if (strlen($username) &lt; 4 || strlen($username) > 20) {
        return false;
    }
    
    return true;
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #3E8FB0">function</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">validate_username</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">username</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Only allow alphanumeric characters and underscores</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #3E8FB0">!</span><span style="color: #EB6F92; font-style: italic">preg_match</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;/</span><span style="color: #3E8FB0">^</span><span style="color: #908CAA">&#91;</span><span style="color: #F6C177">a-zA-Z0-9_</span><span style="color: #908CAA">&#93;</span><span style="color: #3E8FB0">+$</span><span style="color: #F6C177">/&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">username</span><span style="color: #908CAA">))</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #3E8FB0">return</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">false</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Username should be between 4 and 20 characters</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #EB6F92; font-style: italic">strlen</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">username</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">&lt;</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">4</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">||</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">strlen</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">username</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">20</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #3E8FB0">return</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">false</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">return</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">true</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #908CAA">}</span></span></code></pre></div>



<h2 class="wp-block-heading" id="advanced-validation-strategies-leveling-up-your-form-game">Advanced Validation Strategies: Leveling Up Your Form Game</h2>



<p>Let&#8217;s explore some advanced techniques that&#8217;ll make your forms smoother than a fresh jar of Skippy.</p>



<h3 class="wp-block-heading" id="real-time-validation-with-ajax">Real-time Validation with AJAX</h3>



<p>Nobody likes waiting until they hit the submit button to find out they&#8217;ve messed up. With AJAX, you can provide real-time feedback as users fill out your form. Here&#8217;s a quick example using jQuery, which comes included with WordPress:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">JavaScript</span><span role="button" tabindex="0" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$('#username').on('blur', function() {
    var username = $(this).val();
    $.ajax({
        url: ajaxurl, // This is defined by WordPress
        type: 'POST',
        data: {
            action: 'validate_username',
            username: username
        },
        success: function(response) {
            if (response.valid) {
                $('#username-error').hide();
            } else {
                $('#username-error').show().text(response.message);
            }
        }
    });
});</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #EA9A97">$</span><span style="color: #E0DEF4">(</span><span style="color: #F6C177">&#39;#username&#39;</span><span style="color: #E0DEF4">)</span><span style="color: #3E8FB0">.</span><span style="color: #EA9A97">on</span><span style="color: #E0DEF4">(</span><span style="color: #F6C177">&#39;blur&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">function</span><span style="color: #908CAA">()</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">var</span><span style="color: #E0DEF4"> </span><span style="color: #E0DEF4; font-style: italic">username</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">$</span><span style="color: #E0DEF4">(</span><span style="color: #E0DEF4; font-style: italic">this</span><span style="color: #E0DEF4">)</span><span style="color: #3E8FB0">.</span><span style="color: #EA9A97">val</span><span style="color: #E0DEF4">()</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #E0DEF4; font-style: italic">$</span><span style="color: #3E8FB0">.</span><span style="color: #EA9A97">ajax</span><span style="color: #E0DEF4">(</span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">        url</span><span style="color: #908CAA">:</span><span style="color: #E0DEF4"> </span><span style="color: #E0DEF4; font-style: italic">ajaxurl</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> This is defined by WordPress</span></span>
<span class="line"><span style="color: #E0DEF4">        type</span><span style="color: #908CAA">:</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;POST&#39;</span><span style="color: #908CAA">,</span></span>
<span class="line"><span style="color: #E0DEF4">        data</span><span style="color: #908CAA">:</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">            action</span><span style="color: #908CAA">:</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;validate_username&#39;</span><span style="color: #908CAA">,</span></span>
<span class="line"><span style="color: #E0DEF4">            username</span><span style="color: #908CAA">:</span><span style="color: #E0DEF4"> </span><span style="color: #E0DEF4; font-style: italic">username</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #908CAA">},</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #EA9A97">success</span><span style="color: #908CAA">:</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">function</span><span style="color: #908CAA">(</span><span style="color: #C4A7E7; font-style: italic">response</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">            </span><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> (</span><span style="color: #E0DEF4; font-style: italic">response</span><span style="color: #3E8FB0">.</span><span style="color: #E0DEF4; font-style: italic">valid</span><span style="color: #E0DEF4">) </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">                </span><span style="color: #EA9A97">$</span><span style="color: #E0DEF4">(</span><span style="color: #F6C177">&#39;#username-error&#39;</span><span style="color: #E0DEF4">)</span><span style="color: #3E8FB0">.</span><span style="color: #EA9A97">hide</span><span style="color: #E0DEF4">()</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">            </span><span style="color: #908CAA">}</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">else</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">                </span><span style="color: #EA9A97">$</span><span style="color: #E0DEF4">(</span><span style="color: #F6C177">&#39;#username-error&#39;</span><span style="color: #E0DEF4">)</span><span style="color: #3E8FB0">.</span><span style="color: #EA9A97">show</span><span style="color: #E0DEF4">()</span><span style="color: #3E8FB0">.</span><span style="color: #EA9A97">text</span><span style="color: #E0DEF4">(</span><span style="color: #E0DEF4; font-style: italic">response</span><span style="color: #3E8FB0">.</span><span style="color: #E0DEF4; font-style: italic">message</span><span style="color: #E0DEF4">)</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">            </span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA">}</span><span style="color: #E0DEF4">)</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #908CAA">}</span><span style="color: #E0DEF4">)</span><span style="color: #908CAA">;</span></span></code></pre></div>



<p>And in your PHP file <strong>functions.php</strong>:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>add_action('wp_ajax_validate_username', 'ajax_validate_username');
add_action('wp_ajax_nopriv_validate_username', 'ajax_validate_username');

function ajax_validate_username() {
    $username = $_POST&#91;'username'&#93;;
    $is_valid = validate_username($username);
    
    wp_send_json(array(
        'valid' => $is_valid,
        'message' => $is_valid ? '' : 'Invalid username'
    ));
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #EA9A97">add_action</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;wp_ajax_validate_username&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;ajax_validate_username&#39;</span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #EA9A97">add_action</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;wp_ajax_nopriv_validate_username&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;ajax_validate_username&#39;</span><span style="color: #908CAA">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #3E8FB0">function</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">ajax_validate_username</span><span style="color: #908CAA">()</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">username</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">_POST</span><span style="color: #908CAA">&#91;</span><span style="color: #F6C177">&#39;username&#39;</span><span style="color: #908CAA">&#93;;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">is_valid</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">validate_username</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">username</span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #EA9A97">wp_send_json</span><span style="color: #908CAA">(</span><span style="color: #EB6F92; font-style: italic">array</span><span style="color: #908CAA">(</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #F6C177">&#39;valid&#39;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">is_valid</span><span style="color: #908CAA">,</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #F6C177">&#39;message&#39;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">is_valid</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">?</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;&#39;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">:</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;Invalid username&#39;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA">));</span></span>
<span class="line"><span style="color: #908CAA">}</span></span></code></pre></div>



<h3 class="wp-block-heading" id="handling-file-uploads-like-a-pro">Handling File Uploads Like a Pro</h3>



<p>File uploads can be a security nightmare if not handled correctly. Here&#8217;s how to validate file uploads without breaking a sweat (this code would be in your <strong>functions.php</strong> file):</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>function validate_file_upload($file) {
    $allowed_types = array('jpg', 'jpeg', 'png', 'gif');
    $max_size = 5 * 1024 * 1024; // 5MB
    
    $file_name = $file&#91;'name'&#93;;
    $file_size = $file&#91;'size'&#93;;
    $file_tmp = $file&#91;'tmp_name'&#93;;
    
    // Check file extension
    $ext = strtolower(pathinfo($file_name, PATHINFO_EXTENSION));
    if (!in_array($ext, $allowed_types)) {
        return "Sorry, only JPG, JPEG, PNG &amp; GIF files are allowed.";
    }
    
    // Check file size
    if ($file_size > $max_size) {
        return "Sorry, your file is too large. Max size is 5MB.";
    }
    
    // Check MIME type
    $finfo = finfo_open(FILEINFO_MIME_TYPE);
    $mime = finfo_file($finfo, $file_tmp);
    finfo_close($finfo);
    
    if (!in_array($mime, array('image/jpeg', 'image/png', 'image/gif'))) {
        return "File type not allowed.";
    }
    
    return true; // File is valid
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #3E8FB0">function</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">validate_file_upload</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">file</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">allowed_types</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">array</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;jpg&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;jpeg&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;png&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;gif&#39;</span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">max_size</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">5</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">*</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">1024</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">*</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">1024</span><span style="color: #908CAA">;</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> 5MB</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">file_name</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">file</span><span style="color: #908CAA">&#91;</span><span style="color: #F6C177">&#39;name&#39;</span><span style="color: #908CAA">&#93;;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">file_size</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">file</span><span style="color: #908CAA">&#91;</span><span style="color: #F6C177">&#39;size&#39;</span><span style="color: #908CAA">&#93;;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">file_tmp</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">file</span><span style="color: #908CAA">&#91;</span><span style="color: #F6C177">&#39;tmp_name&#39;</span><span style="color: #908CAA">&#93;;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Check file extension</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">ext</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">strtolower</span><span style="color: #908CAA">(</span><span style="color: #EB6F92; font-style: italic">pathinfo</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">file_name</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">PATHINFO_EXTENSION</span><span style="color: #908CAA">));</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #3E8FB0">!</span><span style="color: #EB6F92; font-style: italic">in_array</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">ext</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">allowed_types</span><span style="color: #908CAA">))</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #3E8FB0">return</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;Sorry, only JPG, JPEG, PNG &amp; GIF files are allowed.&quot;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Check file size</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">file_size</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">max_size</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #3E8FB0">return</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;Sorry, your file is too large. Max size is 5MB.&quot;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Check MIME type</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">finfo</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">finfo_open</span><span style="color: #908CAA">(</span><span style="color: #F6C177">FILEINFO_MIME_TYPE</span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">mime</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">finfo_file</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">finfo</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">file_tmp</span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #EB6F92; font-style: italic">finfo_close</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">finfo</span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #3E8FB0">!</span><span style="color: #EB6F92; font-style: italic">in_array</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">mime</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">array</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;image/jpeg&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;image/png&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;image/gif&#39;</span><span style="color: #908CAA">)))</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #3E8FB0">return</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;File type not allowed.&quot;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">return</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">true</span><span style="color: #908CAA">;</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> File is valid</span></span>
<span class="line"><span style="color: #908CAA">}</span></span></code></pre></div>



<h2 class="wp-block-heading" id="sanitization-cleaning-up-the-riffraff">Sanitization: Cleaning Up the Riffraff</h2>



<p>Validation is great, but sometimes sneaky data can still slip through. That&#8217;s where sanitization comes in, ensuring that even if bad data gets past validation, it can&#8217;t cause any mischief.</p>



<h3 class="wp-block-heading" id="word-press-sanitization-functions-your-new-best-friends">WordPress Sanitization Functions: Your New Best Friends</h3>



<p>WordPress comes with a bunch of handy sanitization functions. Here are some you&#8217;ll want to keep in your back pocket:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>// For plain text
$clean_text = sanitize_text_field($_POST&#91;'user_input'&#93;);

// For HTML content (like from a WYSIWYG editor)
$clean_html = wp_kses_post($_POST&#91;'html_input'&#93;);

// For emails
$clean_email = sanitize_email($_POST&#91;'email_input'&#93;);

// For URLs
$clean_url = esc_url_raw($_POST&#91;'url_input'&#93;);</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> For plain text</span></span>
<span class="line"><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">clean_text</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">sanitize_text_field</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">_POST</span><span style="color: #908CAA">&#91;</span><span style="color: #F6C177">&#39;user_input&#39;</span><span style="color: #908CAA">&#93;);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> For HTML content (like from a WYSIWYG editor)</span></span>
<span class="line"><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">clean_html</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">wp_kses_post</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">_POST</span><span style="color: #908CAA">&#91;</span><span style="color: #F6C177">&#39;html_input&#39;</span><span style="color: #908CAA">&#93;);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> For emails</span></span>
<span class="line"><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">clean_email</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">sanitize_email</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">_POST</span><span style="color: #908CAA">&#91;</span><span style="color: #F6C177">&#39;email_input&#39;</span><span style="color: #908CAA">&#93;);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> For URLs</span></span>
<span class="line"><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">clean_url</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">esc_url_raw</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">_POST</span><span style="color: #908CAA">&#91;</span><span style="color: #F6C177">&#39;url_input&#39;</span><span style="color: #908CAA">&#93;);</span></span></code></pre></div>



<h3 class="wp-block-heading" id="creating-custom-sanitization-methods">Creating Custom Sanitization Methods</h3>



<p>Sometimes, you need a bit more control. Here&#8217;s an example of a custom sanitization method for a username:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>function sanitize_username($username) {
    // Remove any HTML tags
    $clean = strip_tags($username);
    
    // Remove any non-alphanumeric characters except underscores
    $clean = preg_replace('/&#91;^a-zA-Z0-9_&#93;/', '', $clean);
    
    // Trim whitespace and limit to 20 characters
    return substr(trim($clean), 0, 20);
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #3E8FB0">function</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">sanitize_username</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">username</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Remove any HTML tags</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">clean</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">strip_tags</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">username</span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Remove any non-alphanumeric characters except underscores</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">clean</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">preg_replace</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;/</span><span style="color: #908CAA">&#91;</span><span style="color: #F6C177">^a-zA-Z0-9_</span><span style="color: #908CAA">&#93;</span><span style="color: #F6C177">/&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">clean</span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Trim whitespace and limit to 20 characters</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">return</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">substr</span><span style="color: #908CAA">(</span><span style="color: #EB6F92; font-style: italic">trim</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">clean</span><span style="color: #908CAA">),</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">0</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">20</span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #908CAA">}</span></span></code></pre></div>



<h2 class="wp-block-heading" id="putting-it-all-together-a-complete-form-processing-example">Putting It All Together: A Complete Form Processing Example</h2>



<p>Let&#8217;s bring everything we&#8217;ve learned together into a complete form processing example (<strong>in functions.php</strong>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>add_action('admin_post_nopriv_submit_user_form', 'handle_user_form');
add_action('admin_post_submit_user_form', 'handle_user_form');

function handle_user_form() {
    // Verify nonce for security
    if (!isset($_POST&#91;'user_form_nonce'&#93;) || !wp_verify_nonce($_POST&#91;'user_form_nonce'&#93;, 'submit_user_form')) {
        wp_die('Security check failed');
    }
    
    $username = isset($_POST&#91;'username'&#93;) ? $_POST&#91;'username'&#93; : '';
    $email = isset($_POST&#91;'email'&#93;) ? $_POST&#91;'email'&#93; : '';
    $age = isset($_POST&#91;'age'&#93;) ? $_POST&#91;'age'&#93; : '';
    
    $errors = array();
    
    // Validate inputs
    if (!validate_username($username)) {
        $errors[] = "Invalid username";
    }
    
    if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
        $errors[] = "Invalid email format";
    }
    
    if (!is_numeric($age) || $age &lt; 18 || $age > 99) {
        $errors[] = "Age must be a number between 18 and 99";
    }
    
    // If there are errors, redirect back to the form
    if (!empty($errors)) {
        $error_string = implode('&amp;', array_map('urlencode', $errors));
        wp_redirect(add_query_arg('errors', $error_string, wp_get_referer()));
        exit;
    }
    
    // Sanitize inputs
    $clean_username = sanitize_username($username);
    $clean_email = sanitize_email($email);
    $clean_age = absint($age);
    
    // Process the form (e.g., save to database)
    // ...
    
    // Redirect to success page
    wp_redirect(add_query_arg('success', '1', wp_get_referer()));
    exit;
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #EA9A97">add_action</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;admin_post_nopriv_submit_user_form&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;handle_user_form&#39;</span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #EA9A97">add_action</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;admin_post_submit_user_form&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;handle_user_form&#39;</span><span style="color: #908CAA">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #3E8FB0">function</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">handle_user_form</span><span style="color: #908CAA">()</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Verify nonce for security</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #3E8FB0">!</span><span style="color: #EB6F92; font-style: italic">isset</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">_POST</span><span style="color: #908CAA">&#91;</span><span style="color: #F6C177">&#39;user_form_nonce&#39;</span><span style="color: #908CAA">&#93;)</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">||</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">!</span><span style="color: #EA9A97">wp_verify_nonce</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">_POST</span><span style="color: #908CAA">&#91;</span><span style="color: #F6C177">&#39;user_form_nonce&#39;</span><span style="color: #908CAA">&#93;,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;submit_user_form&#39;</span><span style="color: #908CAA">))</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #EA9A97">wp_die</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;Security check failed&#39;</span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">username</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">isset</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">_POST</span><span style="color: #908CAA">&#91;</span><span style="color: #F6C177">&#39;username&#39;</span><span style="color: #908CAA">&#93;)</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">?</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">_POST</span><span style="color: #908CAA">&#91;</span><span style="color: #F6C177">&#39;username&#39;</span><span style="color: #908CAA">&#93;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">:</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;&#39;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">email</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">isset</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">_POST</span><span style="color: #908CAA">&#91;</span><span style="color: #F6C177">&#39;email&#39;</span><span style="color: #908CAA">&#93;)</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">?</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">_POST</span><span style="color: #908CAA">&#91;</span><span style="color: #F6C177">&#39;email&#39;</span><span style="color: #908CAA">&#93;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">:</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;&#39;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">age</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">isset</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">_POST</span><span style="color: #908CAA">&#91;</span><span style="color: #F6C177">&#39;age&#39;</span><span style="color: #908CAA">&#93;)</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">?</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">_POST</span><span style="color: #908CAA">&#91;</span><span style="color: #F6C177">&#39;age&#39;</span><span style="color: #908CAA">&#93;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">:</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;&#39;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">errors</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">array</span><span style="color: #908CAA">();</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Validate inputs</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #3E8FB0">!</span><span style="color: #EA9A97">validate_username</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">username</span><span style="color: #908CAA">))</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">errors</span><span style="color: #908CAA">[]</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;Invalid username&quot;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #3E8FB0">!</span><span style="color: #EB6F92; font-style: italic">filter_var</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">email</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">FILTER_VALIDATE_EMAIL</span><span style="color: #908CAA">))</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">errors</span><span style="color: #908CAA">[]</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;Invalid email format&quot;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #3E8FB0">!</span><span style="color: #EB6F92; font-style: italic">is_numeric</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">age</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">||</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">age</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">&lt;</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">18</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">||</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">age</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">99</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">errors</span><span style="color: #908CAA">[]</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;Age must be a number between 18 and 99&quot;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> If there are errors, redirect back to the form</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #3E8FB0">!</span><span style="color: #EB6F92; font-style: italic">empty</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">errors</span><span style="color: #908CAA">))</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">error_string</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">implode</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;&amp;&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">array_map</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;urlencode&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">errors</span><span style="color: #908CAA">));</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #EA9A97">wp_redirect</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">add_query_arg</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;errors&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">error_string</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">wp_get_referer</span><span style="color: #908CAA">()));</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #3E8FB0">exit</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Sanitize inputs</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">clean_username</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">sanitize_username</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">username</span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">clean_email</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">sanitize_email</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">email</span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">clean_age</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">absint</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">age</span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Process the form (e.g., save to database)</span></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> ...</span></span>
<span class="line"><span style="color: #E0DEF4">    </span></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Redirect to success page</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #EA9A97">wp_redirect</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">add_query_arg</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;success&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;1&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">wp_get_referer</span><span style="color: #908CAA">()));</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">exit</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #908CAA">}</span></span></code></pre></div>



<h2 class="wp-block-heading" id="wrapping-up-youre-now-a-form-security-ninja">Wrapping Up: You&#8217;re Now a Form Security Ninja!</h2>



<p>Congratulations! You&#8217;ve just leveled up your WordPress form-handling skills. By implementing these validation and sanitization techniques, you&#8217;re following best practices and protecting your users and your reputation.</p>



<p>The world of web security is always evolving, so stay curious and keep learning.</p>



<p>Happy coding, and if you have any questions, just ask!</p>



<p></p>



<p></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Use PHP in_array() Function</title>
		<link>https://blog.gravyware.com/php-in_array</link>
		
		<dc:creator><![CDATA[David Garthe]]></dc:creator>
		<pubDate>Thu, 15 Aug 2024 22:52:52 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Programming]]></category>
		<guid isPermaLink="false">https://blog.gravyware.com/?p=3434</guid>

					<description><![CDATA[The PHP in_array() function allows you to check if a specific value exists in an array. It has a few nuances that can drive you crazy until you figure them out.]]></description>
										<content:encoded><![CDATA[
<p>The PHP <strong>in_array()</strong> function is a powerful tool in PHP that allows you to check if a specific value exists in an array. This function is handy when you need to validate input, filter data, or implement search functionality in your PHP applications.</p>



<p>It&#8217;s a simple function, but it has a few nuances that can drive you crazy until you figure them out. Let&#8217;s go over everything.</p>



<h2 class="wp-block-heading">Syntax and Parameters</h2>



<p>The basic syntax of the <strong>in_array()</strong> function is as follows:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" data-code="bool in_array ( mixed $needle , array $haystack [, bool $strict = false ] )" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #3E8FB0">bool</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">in_array</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">mixed</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">needle</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">array</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">haystack</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">[,</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">bool</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">strict</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">false</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">]</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">)</span></span></code></pre></div>



<p>Let&#8217;s break down the parameters:</p>



<ol class="wp-block-list">
<li>$needle: The value to search for in the array.</li>



<li>$haystack: The array to search in.</li>



<li>$strict (optional): If set to <strong>true</strong>, the function will also check for type equality.</li>
</ol>



<p>The function returns <strong>true</strong> if the <strong>$needle</strong> is found in the <strong>$haystack</strong>, and <strong>false</strong> otherwise.</p>



<h2 class="wp-block-heading">Basic Usage</h2>



<p>Here&#8217;s a simple example of how to use <strong>in_array()</strong>:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" data-code="$fruits = array(&quot;apple&quot;, &quot;banana&quot;, &quot;orange&quot;);
if (in_array(&quot;banana&quot;, $fruits)) {
    echo &quot;Found banana!&quot;;
} else {
    echo &quot;Banana not found.&quot;;
}" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">fruits</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">array</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&quot;apple&quot;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;banana&quot;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;orange&quot;</span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #EB6F92; font-style: italic">in_array</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&quot;banana&quot;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">fruits</span><span style="color: #908CAA">))</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #EB6F92; font-style: italic">echo</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;Found banana!&quot;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #908CAA">}</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">else</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #EB6F92; font-style: italic">echo</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;Banana not found.&quot;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #908CAA">}</span></span></code></pre></div>



<p>In this example, the output will be &#8220;Found banana!&#8221; because &#8220;banana&#8221; exists in the <strong>$fruits</strong> array.</p>



<h2 class="wp-block-heading">Strict Mode</h2>



<p>The third parameter, <strong>$strict</strong>, is particularly important when dealing with different data types. When set to <strong>true</strong>, it performs a strict comparison (===) instead of a loose comparison (==).</p>



<p>Consider this example:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" data-code="$numbers = array(1, &quot;2&quot;, 3);

var_dump(in_array(2, $numbers));        // Output: bool(true)
var_dump(in_array(2, $numbers, true));  // Output: bool(false)" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">numbers</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">array</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">1</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;2&quot;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">3</span><span style="color: #908CAA">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #EB6F92; font-style: italic">var_dump</span><span style="color: #908CAA">(</span><span style="color: #EB6F92; font-style: italic">in_array</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">2</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">numbers</span><span style="color: #908CAA">));</span><span style="color: #E0DEF4">        </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Output: bool(true)</span></span>
<span class="line"><span style="color: #EB6F92; font-style: italic">var_dump</span><span style="color: #908CAA">(</span><span style="color: #EB6F92; font-style: italic">in_array</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">2</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">numbers</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">true</span><span style="color: #908CAA">));</span><span style="color: #E0DEF4">  </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Output: bool(false)</span></span></code></pre></div>



<p>In the first case, <strong>in_array()</strong> returns <strong>true</strong> because it finds the string &#8220;2&#8221;, which is loosely equal to the integer 2. In the second case, with strict mode enabled, it returns <strong>false</strong> because there is no integer 2 in the array.</p>



<h2 class="wp-block-heading">This Gave Me Trouble</h2>



<figure class="wp-block-image size-full is-resized"><img decoding="async" width="800" height="533" src="https://blog.gravyware.com/wp-content/uploads/2024/08/stressed_developer_800x533.jpg" alt="A Software Developer who can't figure out why the PHP In_array function isn't working for him" class="wp-image-3441" style="width:899px;height:auto" srcset="https://blog.gravyware.com/wp-content/uploads/2024/08/stressed_developer_800x533.jpg 800w, https://blog.gravyware.com/wp-content/uploads/2024/08/stressed_developer_800x533-300x200.jpg 300w, https://blog.gravyware.com/wp-content/uploads/2024/08/stressed_developer_800x533-768x512.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p>I couldn&#8217;t figure out why some searches worked, while others did not.</p>



<p>This works:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" data-code="// single level array
$array = array(5) {
	[&quot;keywords&quot;]=&gt; string(5) &quot;74.51&quot;
	[&quot;wordCount&quot;]=&gt; string(1) &quot;0&quot;
	[&quot;linkCount&quot;]=&gt; string(1) &quot;0&quot;
	[&quot;headingCount&quot;]=&gt; string(1) &quot;0&quot;
	[&quot;mediaCount&quot;]=&gt; string(1) &quot;0&quot; }
 }
$test_result = in_array(74.51, $array) // test_result is true
" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> single level array</span></span>
<span class="line"><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">array</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">array</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">5</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">	</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;keywords&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">string</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">5</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;74.51&quot;</span></span>
<span class="line"><span style="color: #E0DEF4">	</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;wordCount&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">string</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">1</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;0&quot;</span></span>
<span class="line"><span style="color: #E0DEF4">	</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;linkCount&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">string</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">1</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;0&quot;</span></span>
<span class="line"><span style="color: #E0DEF4">	</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;headingCount&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">string</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">1</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;0&quot;</span></span>
<span class="line"><span style="color: #E0DEF4">	</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;mediaCount&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">string</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">1</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;0&quot;</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #E0DEF4"> }</span></span>
<span class="line"><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">test_result</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">in_array</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">74</span><span style="color: #908CAA">.</span><span style="color: #EA9A97">51</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">array</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> test_result is true</span></span>
<span class="line"></span></code></pre></div>



<p>This does not until you reference the sub-array (in <strong>$test_result2</strong>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" data-code="// an array exists within another array
$array = array(6) {
	[&quot;width&quot;]=&gt; int(30)
	[&quot;height&quot;]=&gt; int(30)
	[&quot;file&quot;]=&gt; string(31) &quot;2022/08/icon_mountainbiking.png&quot;
	[&quot;filesize&quot;]=&gt; int(1670)
	[&quot;sizes&quot;]=&gt; array(0) { }
	[&quot;image_meta&quot;]=&gt; array(12) {
		[&quot;aperture&quot;]=&gt; string(1) &quot;0&quot;
		[&quot;credit&quot;]=&gt; string(0) &quot;&quot;
		[&quot;camera&quot;]=&gt; string(0) &quot;&quot;
		[&quot;caption&quot;]=&gt; string(0) &quot;&quot;
		[&quot;created_timestamp&quot;]=&gt; string(1) &quot;0&quot;
		[&quot;copyright&quot;]=&gt; string(0) &quot;&quot;
		[&quot;focal_length&quot;]=&gt; string(1) &quot;0&quot;
		[&quot;iso&quot;]=&gt; string(1) &quot;0&quot;
		[&quot;shutter_speed&quot;]=&gt; string(1) &quot;0&quot;
		[&quot;title&quot;]=&gt; string(0) &quot;&quot;
		[&quot;orientation&quot;]=&gt; string(1) &quot;0&quot;
		[&quot;keywords&quot;]=&gt; array(0) { }
	}
}
$test_result = in_array(0, $array) //test_result is &quot;false&quot;
$test_result2 = in_array(0, $array['image_meta']) //test_result is &quot;true&quot;" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> an array exists within another array</span></span>
<span class="line"><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">array</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">array</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">6</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">	</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;width&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">int</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">30</span><span style="color: #908CAA">)</span></span>
<span class="line"><span style="color: #E0DEF4">	</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;height&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">int</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">30</span><span style="color: #908CAA">)</span></span>
<span class="line"><span style="color: #E0DEF4">	</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;file&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">string</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">31</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;2022/08/icon_mountainbiking.png&quot;</span></span>
<span class="line"><span style="color: #E0DEF4">	</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;filesize&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">int</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">1670</span><span style="color: #908CAA">)</span></span>
<span class="line"><span style="color: #E0DEF4">	</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;sizes&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">array</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">0</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #E0DEF4">	</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;image_meta&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">array</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">12</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">		</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;aperture&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">string</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">1</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;0&quot;</span></span>
<span class="line"><span style="color: #E0DEF4">		</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;credit&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">string</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">0</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;&quot;</span></span>
<span class="line"><span style="color: #E0DEF4">		</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;camera&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">string</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">0</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;&quot;</span></span>
<span class="line"><span style="color: #E0DEF4">		</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;caption&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">string</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">0</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;&quot;</span></span>
<span class="line"><span style="color: #E0DEF4">		</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;created_timestamp&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">string</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">1</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;0&quot;</span></span>
<span class="line"><span style="color: #E0DEF4">		</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;copyright&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">string</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">0</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;&quot;</span></span>
<span class="line"><span style="color: #E0DEF4">		</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;focal_length&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">string</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">1</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;0&quot;</span></span>
<span class="line"><span style="color: #E0DEF4">		</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;iso&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">string</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">1</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;0&quot;</span></span>
<span class="line"><span style="color: #E0DEF4">		</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;shutter_speed&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">string</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">1</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;0&quot;</span></span>
<span class="line"><span style="color: #E0DEF4">		</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;title&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">string</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">0</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;&quot;</span></span>
<span class="line"><span style="color: #E0DEF4">		</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;orientation&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">string</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">1</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;0&quot;</span></span>
<span class="line"><span style="color: #E0DEF4">		</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;keywords&quot;</span><span style="color: #908CAA">]</span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">array</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">0</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #E0DEF4">	</span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">test_result</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">in_array</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">0</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">array</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic">test_result is &quot;false&quot;</span></span>
<span class="line"><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">test_result2</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">in_array</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">0</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">array</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&#39;image_meta&#39;</span><span style="color: #908CAA">])</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic">test_result is &quot;true&quot;</span></span></code></pre></div>



<p class="has-large-font-size">Findings:</p>



<p>You must reference the element that contains the array you want to search. You cannot reference the top-level array only and expect it to traverse down through sub-arrays.</p>



<figure class="wp-block-pullquote is-style-default has-theme-palette-7-background-color has-background has-medium-font-size"><blockquote><p>The in_array() function alone does not recurse through multidimensional arrays.<br><br>The command searches a single-level only.</p></blockquote></figure>



<h2 class="wp-block-heading">Searching in Multidimensional Arrays</h2>



<p>While <strong>in_array()</strong> works great for one-dimensional arrays, it doesn&#8217;t directly search nested arrays. To search in multidimensional arrays, you&#8217;ll need to use it in combination with other functions or write a custom function.</p>



<p>Here&#8217;s an example of how you might search a multidimensional array:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" data-code="function in_array_r($needle, $haystack, $strict = false) {
    foreach ($haystack as $item) {
        if (($strict ? $item === $needle : $item == $needle) || (is_array($item) &amp;&amp; in_array_r($needle, $item, $strict))) {
            return true;
        }
    }
    return false;
}

$users = array(
    array(&quot;name&quot; =&gt; &quot;John&quot;, &quot;age&quot; =&gt; 25),
    array(&quot;name&quot; =&gt; &quot;Jane&quot;, &quot;age&quot; =&gt; 30)
);

var_dump(in_array_r(&quot;Jane&quot;, $users));  // Output: bool(true)" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #3E8FB0">function</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">in_array_r</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">needle</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">haystack</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">strict</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">false</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">foreach</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">haystack</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">as</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">item</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">((</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">strict</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">?</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">item</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">===</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">needle</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">:</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">item</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">==</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">needle</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">||</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #EB6F92; font-style: italic">is_array</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">item</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">&amp;&amp;</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">in_array_r</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">needle</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">item</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">strict</span><span style="color: #908CAA">)))</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">            </span><span style="color: #3E8FB0">return</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">true</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">return</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">false</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #908CAA">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">users</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">array</span><span style="color: #908CAA">(</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #EB6F92; font-style: italic">array</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&quot;name&quot;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;John&quot;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;age&quot;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">25</span><span style="color: #908CAA">),</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #EB6F92; font-style: italic">array</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&quot;name&quot;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;Jane&quot;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;age&quot;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">30</span><span style="color: #908CAA">)</span></span>
<span class="line"><span style="color: #908CAA">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #EB6F92; font-style: italic">var_dump</span><span style="color: #908CAA">(</span><span style="color: #EA9A97">in_array_r</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&quot;Jane&quot;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">users</span><span style="color: #908CAA">));</span><span style="color: #E0DEF4">  </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Output: bool(true)</span></span></code></pre></div>



<h2 class="wp-block-heading">Performance Considerations</h2>



<p>While <strong>in_array()</strong> is convenient, it can be slower for large arrays because it performs a linear search. For better performance with large datasets, consider using <strong>array_flip()</strong> in combination with <strong>isset()</strong>:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" data-code="$fruits = array(&quot;apple&quot;, &quot;banana&quot;, &quot;orange&quot;);
$flipped = array_flip($fruits);

if (isset($flipped[&quot;banana&quot;])) {
    echo &quot;Found banana!&quot;;
}" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">fruits</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">array</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&quot;apple&quot;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;banana&quot;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;orange&quot;</span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">flipped</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">array_flip</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">fruits</span><span style="color: #908CAA">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #EB6F92; font-style: italic">isset</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">flipped</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&quot;banana&quot;</span><span style="color: #908CAA">]))</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #EB6F92; font-style: italic">echo</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&quot;Found banana!&quot;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #908CAA">}</span></span></code></pre></div>



<p>This method is generally faster for large arrays because <strong>isset()</strong> has constant time complexity.</p>



<h2 class="wp-block-heading">Common Use Cases</h2>



<ol class="wp-block-list">
<li><strong>Input Validation</strong>: Check if a user&#8217;s input is in a list of allowed values.</li>



<li><strong>Filtering Data</strong>: Remove or keep elements based on whether they exist in another array.</li>



<li><strong>Menu Highlighting</strong>: Determine if the current page is in the list of menu items.</li>



<li><strong>Permission Checking</strong>: Verify if a user has a specific permission from a list.</li>
</ol>



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



<p>The <strong>in_array()</strong> function is a versatile tool in PHP for checking the existence of values in arrays. Unfortunately, I&#8217;ve spent many hours trying to debug an in_array() command and wondering why it wasn&#8217;t finding a value that was in a sub-array. Seems simple, but it&#8217;s easy to forget.</p>



<p>Remember to consider performance implications for large datasets and explore alternative methods when dealing with multidimensional arrays.</p>



<p>As with any PHP function, it&#8217;s always a good idea to refer to the <a href="https://www.php.net/docs.php" target="_blank" rel="noreferrer noopener">official PHP documentation</a> for the most up-to-date information and additional details about <strong>in_array()</strong> and related functions.</p>



<p>Happy coding!</p>



<p>P.S. Read this if you want to <a href="https://blog.gravyware.com/what-is-ec2-setup-a-web-server-tutorial-in-aws">set up your own PHP server in AWS</a>.</p>



<p></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Use Shortcodes in WordPress: A Beginner&#8217;s Guide</title>
		<link>https://blog.gravyware.com/how-to-use-shortcodes-in-wordpress</link>
		
		<dc:creator><![CDATA[David Garthe]]></dc:creator>
		<pubDate>Wed, 07 Aug 2024 20:56:43 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Programming]]></category>
		<guid isPermaLink="false">https://blog.gravyware.com/?p=3390</guid>

					<description><![CDATA[Learn how to effectively use a shortcode in WordPress without writing complex code. This guide covers every method of using shortcodes in the editor and code.]]></description>
										<content:encoded><![CDATA[
<p>Shortcodes are convenient tools that allow you to add features or styled content to your posts or pages without needing to write complex code. They are enclosed in square brackets and may include attributes that customize their behavior.</p>



<p>We&#8217;ll explore how to find shortcodes from various sources such as WordPress core, themes, and plugins. Additionally, we&#8217;ll cover how to use shortcodes in both the block editor (Gutenberg) and the classic editor.</p>



<div class="wp-block-rank-math-toc-block has-theme-palette-7-background-color has-background" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--20)" id="rank-math-toc"><h2>Table of Contents</h2><nav><ul><li><a href="#lets-get-started">Let&#8217;s get started</a></li><li><a href="#understanding-shortcodes">Understanding shortcodes</a></li><li><a href="#finding-shortcodes">Finding Shortcodes</a><ul><li><a href="#shortcodes-finder-plugin">Shortcodes Finder Plugin</a></li></ul></li><li><a href="#how-to-reference-a-shortcode">How to Reference a Shortcode</a><ul><li><a href="#in-the-block-editor-gutenberg">In the Block Editor (Gutenberg)</a></li><li><a href="#in-the-classic-editor">In the Classic Editor</a></li></ul></li><li><a href="#using-shortcodes-in-widgets">Using Shortcodes in Widgets</a></li><li><a href="#using-shortcodes-with-attributes">Using Shortcodes with Attributes</a></li><li><a href="#using-shortcodes-in-php-code">Using Shortcodes in PHP code</a></li><li><a href="#creating-shortcodes-in-php-code">Creating Shortcodes in PHP code</a></li><li><a href="#troubleshooting-shortcodes">Troubleshooting Shortcodes</a></li><li><a href="#best-practices">Best Practices</a></li></ul></nav></div>



<h2 class="wp-block-heading" id="lets-get-started">Let&#8217;s get started</h2>



<p>Shortcodes are convenient tools in WordPress that allow you to add features or styled content to your posts or pages without needing to write complex code. Here&#8217;s how to use shortcodes created by others:</p>



<h2 class="wp-block-heading" id="understanding-shortcodes">Understanding shortcodes</h2>



<p>Shortcodes typically look like this: [shortcode_name] or [shortcode_name attribute=&#8221;value&#8221;].</p>



<p>They&#8217;re enclosed in square brackets and may include attributes that customize their behavior.</p>



<h2 class="wp-block-heading" id="finding-shortcodes">Finding Shortcodes</h2>



<p>Shortcodes can come from various sources:</p>



<ul class="wp-block-list">
<li>WordPress core (e.g., gallery, caption)</li>



<li>Your theme</li>



<li>Plugins you&#8217;ve installed</li>
</ul>



<p>To find available shortcodes:</p>



<ul class="wp-block-list">
<li>Check your theme&#8217;s documentation</li>



<li>Look in the settings or documentation of your installed plugins</li>



<li>Use a plugin like &#8220;Shortcodes Finder&#8221; to discover shortcodes on your site</li>
</ul>



<p>To find the available shortcodes on your website, check your theme&#8217;s documentation, the settings or documentation of your installed plugins, or use a plugin like Shortcode Finder. To install it, go to plugins, click &#8220;Add New,&#8221; type &#8220;Shortcode Finder,&#8221; and search for it.</p>



<h3 class="wp-block-heading" id="shortcodes-finder-plugin">Shortcodes Finder Plugin</h3>



<p>First, install this free plugin.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="569" height="305" src="https://blog.gravyware.com/wp-content/uploads/2024/08/image-3.png" alt="shortcodes finder plugin" class="wp-image-3393" srcset="https://blog.gravyware.com/wp-content/uploads/2024/08/image-3.png 569w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-3-300x161.png 300w" sizes="auto, (max-width: 569px) 100vw, 569px" /></figure>



<p>To use the plugin, go to the &#8220;Tools&#8221; admin section, and find the link called &#8220;Shortcodes Finder&#8221;.</p>



<p>Click &#8220;Tools&#8221;, and then &#8220;Shortcodes Finder&#8221; near the bottom.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1532" height="726" src="https://blog.gravyware.com/wp-content/uploads/2024/08/image-13.png" alt="Step 4: Click on Tools then Shortcodes Finder near the bottom" class="wp-image-3423" srcset="https://blog.gravyware.com/wp-content/uploads/2024/08/image-13.png 1532w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-13-300x142.png 300w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-13-1024x485.png 1024w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-13-768x364.png 768w" sizes="auto, (max-width: 1532px) 100vw, 1532px" /></figure>



<p></p>



<p>In the Shortcodes Finder tool, go to Documentation to find everything or locate unused shortcodes.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1532" height="726" src="https://blog.gravyware.com/wp-content/uploads/2024/08/image-12.png" alt="Step 5: Click on Documentation" class="wp-image-3422" srcset="https://blog.gravyware.com/wp-content/uploads/2024/08/image-12.png 1532w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-12-300x142.png 300w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-12-1024x485.png 1024w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-12-768x364.png 768w" sizes="auto, (max-width: 1532px) 100vw, 1532px" /></figure>



<p></p>



<p>If you click on the WordPress front end and do a search, it will display the various shortcodes you can use.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1532" height="726" src="https://blog.gravyware.com/wp-content/uploads/2024/08/image-14.png" alt="Step 6: Click here" class="wp-image-3424" srcset="https://blog.gravyware.com/wp-content/uploads/2024/08/image-14.png 1532w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-14-300x142.png 300w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-14-1024x485.png 1024w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-14-768x364.png 768w" sizes="auto, (max-width: 1532px) 100vw, 1532px" /></figure>



<p></p>



<p>You&#8217;ll see some built-in WordPress shortcodes listed.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1532" height="726" src="https://blog.gravyware.com/wp-content/uploads/2024/08/image-11.png" alt="Step 8: Youll see some built-in WordPress shortcodes listed" class="wp-image-3421" srcset="https://blog.gravyware.com/wp-content/uploads/2024/08/image-11.png 1532w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-11-300x142.png 300w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-11-1024x485.png 1024w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-11-768x364.png 768w" sizes="auto, (max-width: 1532px) 100vw, 1532px" /></figure>



<p>You have audio, caption, gallery, and others. These are some of the shortcodes built into WordPress that you can use immediately.</p>



<h2 class="wp-block-heading" id="how-to-reference-a-shortcode">How to Reference a Shortcode</h2>



<p>How do we actually use shortcodes in a WordPress site? The methods depend on how your site is setup. Your theme will most likely have either a block editor or the classic editor when editing pages and posts.</p>



<h3 class="wp-block-heading" id="in-the-block-editor-gutenberg">In the Block Editor (Gutenberg)</h3>



<p>While in the area you want to place the shortcode, type &#8220;/&#8221; to bring up options.</p>



<p>Click on &#8220;[ / ] Shortcode&#8221;.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1532" height="726" src="https://blog.gravyware.com/wp-content/uploads/2024/08/image-15.png" alt="Step 13: Click on    Shortcode" class="wp-image-3425" srcset="https://blog.gravyware.com/wp-content/uploads/2024/08/image-15.png 1532w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-15-300x142.png 300w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-15-1024x485.png 1024w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-15-768x364.png 768w" sizes="auto, (max-width: 1532px) 100vw, 1532px" /></figure>



<p>Enter your shortcode in the box and hit save.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1532" height="726" src="https://blog.gravyware.com/wp-content/uploads/2024/08/image-6.png" alt="Step 16: Click on  gallery ids   37383940  " class="wp-image-3416" srcset="https://blog.gravyware.com/wp-content/uploads/2024/08/image-6.png 1532w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-6-300x142.png 300w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-6-1024x485.png 1024w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-6-768x364.png 768w" sizes="auto, (max-width: 1532px) 100vw, 1532px" /></figure>



<h3 class="wp-block-heading" id="in-the-classic-editor">In the Classic Editor</h3>



<p>In the classic editor, you need to go to the Text section of a page (Top right corner of the text area) and manually type out the shortcode.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1532" height="726" src="https://blog.gravyware.com/wp-content/uploads/2024/08/image-7.png" alt="Step 20: Click on Text" class="wp-image-3417" srcset="https://blog.gravyware.com/wp-content/uploads/2024/08/image-7.png 1532w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-7-300x142.png 300w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-7-1024x485.png 1024w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-7-768x364.png 768w" sizes="auto, (max-width: 1532px) 100vw, 1532px" /></figure>



<p></p>



<p>Simply <strong>type or paste the shortcode directly into the content area</strong> where you want it to appear and Save the page or post.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="800" height="382" src="https://blog.gravyware.com/wp-content/uploads/2024/08/image-5.png" alt="" class="wp-image-3401" srcset="https://blog.gravyware.com/wp-content/uploads/2024/08/image-5.png 800w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-5-300x143.png 300w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-5-768x367.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure>



<p>When viewed from the front end, the shortcode will be deciphered by WordPress, and the result will be displayed to the user in their browser window.</p>



<p></p>



<h2 class="wp-block-heading" id="using-shortcodes-in-widgets">Using Shortcodes in Widgets</h2>



<p>You can also use shortcuts in widgets. To use shortcuts in widgets, go to Appearance, then Widgets.</p>



<p><strong>1.</strong> Go to Appearance > Widgets in your WordPress dashboard</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1532" height="822" src="https://blog.gravyware.com/wp-content/uploads/2024/08/image-16.png" alt="Step 1: Go to Appearance  Widgets in your WordPress dashboard" class="wp-image-3426" srcset="https://blog.gravyware.com/wp-content/uploads/2024/08/image-16.png 1532w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-16-300x161.png 300w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-16-1024x549.png 1024w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-16-768x412.png 768w" sizes="auto, (max-width: 1532px) 100vw, 1532px" /></figure>



<p><strong>2.</strong> You can see that this site already uses shortcodes in the &#8220;Sidebar 1&#8221; widget.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1532" height="822" src="https://blog.gravyware.com/wp-content/uploads/2024/08/image-8.png" alt="Step 2: You can see that this site already uses shortcodes in the Sidebar 1 widget" class="wp-image-3418" srcset="https://blog.gravyware.com/wp-content/uploads/2024/08/image-8.png 1532w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-8-300x161.png 300w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-8-1024x549.png 1024w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-8-768x412.png 768w" sizes="auto, (max-width: 1532px) 100vw, 1532px" /></figure>



<p>To add another one, click the Add button. Check the shortcode type, then type it in.</p>



<p><strong>3.</strong> Click on &#8220;+&#8221; to add a new shortcode reference.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1532" height="822" src="https://blog.gravyware.com/wp-content/uploads/2024/08/image-9.png" alt="Step 3: Click on " class="wp-image-3419" srcset="https://blog.gravyware.com/wp-content/uploads/2024/08/image-9.png 1532w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-9-300x161.png 300w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-9-1024x549.png 1024w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-9-768x412.png 768w" sizes="auto, (max-width: 1532px) 100vw, 1532px" /></figure>



<p><strong>4.</strong> Click on &#8220;Custom HTML&#8221;. You might have to search for it if it&#8217;s not one of the first few.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1532" height="822" src="https://blog.gravyware.com/wp-content/uploads/2024/08/image-10.png" alt="Step 4: Click on Custom HTML You might have to search for it if its not one of the first few" class="wp-image-3420" srcset="https://blog.gravyware.com/wp-content/uploads/2024/08/image-10.png 1532w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-10-300x161.png 300w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-10-1024x549.png 1024w, https://blog.gravyware.com/wp-content/uploads/2024/08/image-10-768x412.png 768w" sizes="auto, (max-width: 1532px) 100vw, 1532px" /></figure>



<p>Type or paste in the new shortcode and hit Save.</p>



<h2 class="wp-block-heading" id="using-shortcodes-with-attributes">Using Shortcodes with Attributes</h2>



<p>Many shortcodes accept attributes to customize their output. Check your theme or plugin documentation to see what&#8217;s available.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" data-code="[shortcode_name attribute1=&quot;value1&quot; attribute2=&quot;value2&quot;]" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #E0DEF4">[</span><span style="color: #E0DEF4; font-style: italic">shortcode_name</span><span style="color: #E0DEF4"> </span><span style="color: #E0DEF4; font-style: italic">attribute1</span><span style="color: #3E8FB0">=</span><span style="color: #F6C177">&quot;value1&quot;</span><span style="color: #E0DEF4"> </span><span style="color: #E0DEF4; font-style: italic">attribute2</span><span style="color: #3E8FB0">=</span><span style="color: #F6C177">&quot;value2&quot;</span><span style="color: #E0DEF4">]</span></span></code></pre></div>



<p></p>



<p>Here&#8217;s an example using a hypothetical &#8220;slider&#8221; shortcode:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" data-code="[slider id=&quot;homepage&quot; speed=&quot;500&quot; arrows=&quot;true&quot;]" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #E0DEF4">[</span><span style="color: #E0DEF4; font-style: italic">slider</span><span style="color: #E0DEF4"> </span><span style="color: #E0DEF4; font-style: italic">id</span><span style="color: #3E8FB0">=</span><span style="color: #F6C177">&quot;homepage&quot;</span><span style="color: #E0DEF4"> </span><span style="color: #E0DEF4; font-style: italic">speed</span><span style="color: #3E8FB0">=</span><span style="color: #F6C177">&quot;500&quot;</span><span style="color: #E0DEF4"> </span><span style="color: #E0DEF4; font-style: italic">arrows</span><span style="color: #3E8FB0">=</span><span style="color: #F6C177">&quot;true&quot;</span><span style="color: #E0DEF4">]</span></span></code></pre></div>



<p></p>



<p>Here&#8217;s a gallery of specific images. The <strong>&#8220;gallery&#8221;</strong> shortcode without the IDs attribute will return all images associated with that particular page or post.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" data-code="" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #E0DEF4">[</span><span style="color: #E0DEF4; font-style: italic">gallery</span><span style="color: #E0DEF4"> </span><span style="color: #E0DEF4; font-style: italic">ids</span><span style="color: #3E8FB0">=</span><span style="color: #F6C177">&quot;123,124,125&quot;</span><span style="color: #E0DEF4">]</span></span></code></pre></div>



<p></p>



<h2 class="wp-block-heading" id="using-shortcodes-in-php-code">Using Shortcodes in PHP code</h2>



<p>Let&#8217;s say you&#8217;re creating a custom theme and need to insert a shortcode directly within the PHP code.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" data-code="&lt;?php echo do_shortcode('[your_shortcode]'); ?&gt;
//simply replace &quot;your_shortcode&quot; with your actual shortcode and you're set." style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #3E8FB0">&lt;?php</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">echo</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">do_shortcode</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;[your_shortcode]&#39;</span><span style="color: #908CAA">);</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">?&gt;</span></span>
<span class="line"><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic">simply replace &quot;your_shortcode&quot; with your actual shortcode and you&#39;re set.</span></span></code></pre></div>



<p></p>



<h2 class="wp-block-heading" id="creating-shortcodes-in-php-code">Creating Shortcodes in PHP code</h2>



<p>This bit is a bit more advanced, but here&#8217;s how you can create a completely new shortcode for your theme. The following code would go into your <strong>functions.php</strong> file.</p>



<p>The new shortcode &#8211; <strong>[last_10_posts]</strong> &#8211; will execute the code below and return the most recent 10 post titles.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e0def4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2d2b46;color:#cecbee">PHP</span><span role="button" tabindex="0" data-code="function last_10_posts_shortcode() {
    // Query for the last 10 posts
    $args = array(
        'numberposts' =&gt; 10,
        'post_status' =&gt; 'publish',
    );
    $recent_posts = wp_get_recent_posts($args);

    // Start output buffering
    ob_start();

    // Check if there are any posts
    if (!empty($recent_posts)) {
        echo '&lt;ul&gt;';
        foreach ($recent_posts as $post) {
            echo '&lt;li&gt;&lt;a href=&quot;' . get_permalink($post['ID']) . '&quot;&gt;' . esc_html($post['post_title']) . '&lt;/a&gt;&lt;/li&gt;';
        }
        echo '&lt;/ul&gt;';
    } else {
        echo '&lt;p&gt;No recent posts found.&lt;/p&gt;';
    }

    // Get the output buffer content
    $output = ob_get_clean();

    return $output;
}

// Register the shortcode
add_shortcode('last_10_posts', 'last_10_posts_shortcode');" style="color:#e0def4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki rose-pine-moon" style="background-color: #232136" tabindex="0"><code><span class="line"><span style="color: #3E8FB0">function</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">last_10_posts_shortcode</span><span style="color: #908CAA">()</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Query for the last 10 posts</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">args</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">array</span><span style="color: #908CAA">(</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #F6C177">&#39;numberposts&#39;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">10</span><span style="color: #908CAA">,</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #F6C177">&#39;post_status&#39;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=&gt;</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;publish&#39;</span><span style="color: #908CAA">,</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA">);</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">recent_posts</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">wp_get_recent_posts</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">args</span><span style="color: #908CAA">);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Start output buffering</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #EB6F92; font-style: italic">ob_start</span><span style="color: #908CAA">();</span></span>
<span class="line"></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Check if there are any posts</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">if</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #3E8FB0">!</span><span style="color: #EB6F92; font-style: italic">empty</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">recent_posts</span><span style="color: #908CAA">))</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #EB6F92; font-style: italic">echo</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;&lt;ul&gt;&#39;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #3E8FB0">foreach</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">recent_posts</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">as</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">post</span><span style="color: #908CAA">)</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">            </span><span style="color: #EB6F92; font-style: italic">echo</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;&lt;li&gt;&lt;a href=&quot;&#39;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">.</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">get_permalink</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">post</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&#39;ID&#39;</span><span style="color: #908CAA">])</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">.</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;&quot;&gt;&#39;</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">.</span><span style="color: #E0DEF4"> </span><span style="color: #EA9A97">esc_html</span><span style="color: #908CAA">(</span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">post</span><span style="color: #908CAA">[</span><span style="color: #F6C177">&#39;post_title&#39;</span><span style="color: #908CAA">])</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">.</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;&lt;/a&gt;&lt;/li&gt;&#39;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #908CAA">}</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #EB6F92; font-style: italic">echo</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;&lt;/ul&gt;&#39;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA">}</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">else</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA">{</span></span>
<span class="line"><span style="color: #E0DEF4">        </span><span style="color: #EB6F92; font-style: italic">echo</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;&lt;p&gt;No recent posts found.&lt;/p&gt;&#39;</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #908CAA">    </span><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Get the output buffer content</span></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">output</span><span style="color: #E0DEF4"> </span><span style="color: #3E8FB0">=</span><span style="color: #E0DEF4"> </span><span style="color: #EB6F92; font-style: italic">ob_get_clean</span><span style="color: #908CAA">();</span></span>
<span class="line"></span>
<span class="line"><span style="color: #E0DEF4">    </span><span style="color: #3E8FB0">return</span><span style="color: #E0DEF4"> </span><span style="color: #908CAA; font-style: italic">$</span><span style="color: #E0DEF4; font-style: italic">output</span><span style="color: #908CAA">;</span></span>
<span class="line"><span style="color: #908CAA">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #908CAA; font-style: italic">//</span><span style="color: #6E6A86; font-style: italic"> Register the shortcode</span></span>
<span class="line"><span style="color: #EA9A97">add_shortcode</span><span style="color: #908CAA">(</span><span style="color: #F6C177">&#39;last_10_posts&#39;</span><span style="color: #908CAA">,</span><span style="color: #E0DEF4"> </span><span style="color: #F6C177">&#39;last_10_posts_shortcode&#39;</span><span style="color: #908CAA">);</span></span></code></pre></div>



<p></p>



<h2 class="wp-block-heading" id="troubleshooting-shortcodes">Troubleshooting Shortcodes</h2>



<p>If a shortcode isn&#8217;t working:</p>



<ul class="wp-block-list">
<li>Double-check the syntax, including spelling and attributes</li>



<li>Ensure the plugin or theme providing the shortcode is active</li>



<li>Check if the shortcode requires any specific setup or configuration</li>
</ul>



<h2 class="wp-block-heading" id="best-practices">Best Practices</h2>



<ol start="8" class="wp-block-list"></ol>



<ul class="wp-block-list">
<li>Don&#8217;t overuse shortcodes; they can make your content harder to read and edit</li>



<li>Keep a list of the shortcodes you frequently use for easy reference</li>



<li>Always preview your content to ensure shortcodes are rendering correctly</li>
</ul>



<p>There is <a href="https://codex.wordpress.org/shortcode" target="_blank" rel="noreferrer noopener">additional information</a> on the WordPress site.</p>



<p>By following these steps, you should be able to effectively use shortcodes created by others in your WordPress site, enhancing its functionality and appearance without needing to write complex code yourself.</p>



<p>Good luck!</p>



<p></p>



<p></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>S3 DeleteObject &#8211; How to Delete Multiple S3 Objects with NodeJS</title>
		<link>https://blog.gravyware.com/s3-deleteobject-for-multiple-s3-objects</link>
		
		<dc:creator><![CDATA[David Garthe]]></dc:creator>
		<pubDate>Fri, 27 Oct 2023 14:39:19 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<guid isPermaLink="false">https://blog.gravyware.com/?p=3332</guid>

					<description><![CDATA[Sometimes, you may need to delete multiple objects from an S3 bucket efficiently.  Here's how we did it using S3 DeleteObjects and NodeJS.]]></description>
										<content:encoded><![CDATA[
<p>Do you have a lot of random files in an S3 bucket that need to be deleted? We had about 12,000 random PDF files that needed to be deleted. They were mixed in with legitimate files and folders, so we needed a way to target specific files and bulk delete them easily.</p>



<p>Sometimes, you may need to delete multiple objects from an S3 bucket efficiently.  Here&#8217;s how we did it using S3 DeleteObjects and NodeJS.</p>


<div class="kb-row-layout-wrap kb-row-layout-id3332_9a4e60-ae alignnone wp-block-kadence-rowlayout"><div class="kt-row-column-wrap kt-has-1-columns kt-row-layout-equal kt-tab-layout-inherit kt-mobile-layout-row kt-row-valign-top">

<div class="wp-block-kadence-column kadence-column3332_449396-e8 kb-section-dir-vertical inner-column-1"><div class="kt-inside-inner-col"><p class="kt-adv-heading3332_f88f21-75 wp-block-kadence-advancedheading kt-adv-heading-has-icon" data-kb-block="kb-adv-heading3332_f88f21-75"><span class="kb-svg-icon-wrap kb-adv-heading-icon kb-svg-icon-fe_info kb-adv-heading-icon-side-left"><svg viewBox="0 0 24 24"  fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"  aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12" y2="8"/></svg></span><span class="kb-adv-text-inner">This code will be run from your local computer.</span></p></div></div>

</div></div>


<p></p>





<p></p>



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



<ol class="wp-block-list">
<li>You have some experience with Node.js and can set up your development environment.</li>



<li>You know what &#8220;S3&#8221; and &#8220;IAM&#8221; are without looking them up.</li>



<li>You understand that mass deleting files can be crazy stressful, yet satisfying.</li>



<li>You understand that you are responsible for what you do.</li>
</ol>



<p>Do you fit these criteria?  Good, let&#8217;s keep going.</p>



<h2 class="wp-block-heading">Your AWS Environment Requirements</h2>



<p>Before you can start using the <a href="https://aws.amazon.com/sdk-for-javascript/" target="_blank" rel="noreferrer noopener">AWS SDK for JavaScript</a> to delete S3 objects, you need to make sure you have some information regarding your AWS environment:</p>



<ol class="wp-block-list">
<li><strong>AWS Account</strong>: You&#8217;ll need to have access to the AWS account.</li>



<li><strong>IAM User</strong>: <a href="https://www.msp360.com/resources/blog/how-to-find-your-aws-access-key-id-and-secret-access-key/" target="_blank" rel="noreferrer noopener nofollow">You&#8217;ll need an IAM</a> (Identity and Access Management) user with the necessary permissions for accessing and deleting objects in the S3 bucket.  You need their Access Keys.</li>



<li><strong>S3 Bucket</strong>: You&#8217;ll need to know which S3 bucket you want to delete objects from. Make sure the IAM user has the required permissions for this bucket.</li>
</ol>



<h2 class="wp-block-heading">Installing and Configuring the AWS SDK for JavaScript</h2>



<p>To use the AWS SDK for JavaScript, you need to install it and configure your AWS credentials. If you haven&#8217;t already installed Node.js and npm (Node Package Manager), make sure to do that first.</p>



<h3 class="wp-block-heading">Installation</h3>



<p>You can install the AWS SDK for JavaScript using npm:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#f6f6f4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(251, 251, 239, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#333545;color:#ebebe6">JavaScript</span><span role="button" tabindex="0" data-code="npm install @aws-sdk/client-s3" style="color:#f6f6f4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dracula-soft" style="background-color: #282A36" tabindex="0"><code><span class="line"><span style="color: #F6F6F4">npm install @</span><span style="color: #62E884; font-style: italic">aws</span><span style="color: #F286C4">-</span><span style="color: #62E884; font-style: italic">sdk</span><span style="color: #F286C4">/</span><span style="color: #62E884; font-style: italic">client</span><span style="color: #F286C4">-</span><span style="color: #62E884; font-style: italic">s3</span></span></code></pre></div>



<p>Also, because we&#8217;re dealing with credentials, you&#8217;ll want to install <a href="https://www.npmjs.com/package/dotenv-safe" target="_blank" rel="noreferrer noopener nofollow">dotenv-safe</a>.</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#f6f6f4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#333545;color:#ebebe6">JavaScript</span><span role="button" tabindex="0" data-code="npm install @dotenv-safe" style="color:#f6f6f4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dracula-soft" style="background-color: #282A36" tabindex="0"><code><span class="line"><span style="color: #F6F6F4">npm install @</span><span style="color: #62E884; font-style: italic">dotenv</span><span style="color: #F286C4">-</span><span style="color: #62E884; font-style: italic">safe</span></span></code></pre></div>



<p></p>



<p>Alrighty.  Let&#8217;s do this.</p>



<h3 class="wp-block-heading">Configuration</h3>



<p>There are three main files in this lesson.  They could have been combined into a single file, but separating them simplifies things a bit.</p>



<figure class="wp-block-kadence-image kb-image3332_82fda5-a1 size-full"><img loading="lazy" decoding="async" width="632" height="160" src="https://blog.gravyware.com/wp-content/uploads/2023/10/s3-deleting-multiple-objects.jpg" alt="the files needed to use the s3 deleteobject command" class="kb-img wp-image-3351" srcset="https://blog.gravyware.com/wp-content/uploads/2023/10/s3-deleting-multiple-objects.jpg 632w, https://blog.gravyware.com/wp-content/uploads/2023/10/s3-deleting-multiple-objects-300x76.jpg 300w" sizes="auto, (max-width: 632px) 100vw, 632px" /></figure>



<p>After installing the SDK, you must configure it with your AWS credentials. The AWS SDK for JavaScript will use these credentials to interact with your AWS services.</p>



<p>You can configure the SDK credentials using the <strong>dotenv-safe</strong> library.  Create a file named &#8220;.env&#8221; and update the lines below with your credentials and bucket information:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#f6f6f4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(251, 251, 239, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#333545;color:#ebebe6">.env</span><span role="button" tabindex="0" data-code="# credentials
S3_REGION = &quot;us-east-1&quot;
ACCESS_KEY_ID = &quot;AKIX8S45D49DJDH7JUNG&quot;
SECRET_ACCESS_KEY = &quot;f6+wDCaGIadoLdxlsE3d8DsnRv02c7jgo2&quot;

# bucket info.  Leave &quot;S3_FOLDER&quot; value blank if you want to start at the top level
S3_BUCKET = &quot;yourBucketName&quot;
S3_FOLDER = &quot;&quot;" style="color:#f6f6f4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dracula-soft" style="background-color: #282A36" tabindex="0"><code><span class="line"><span style="color: #F6F6F4"># credentials</span></span>
<span class="line"><span style="color: #F6F6F4">S3_REGION </span><span style="color: #F286C4">=</span><span style="color: #F6F6F4"> </span><span style="color: #DEE492">&quot;</span><span style="color: #E7EE98">us-east-1</span><span style="color: #DEE492">&quot;</span></span>
<span class="line"><span style="color: #F6F6F4">ACCESS_KEY_ID </span><span style="color: #F286C4">=</span><span style="color: #F6F6F4"> </span><span style="color: #DEE492">&quot;</span><span style="color: #E7EE98">AKIX8S45D49DJDH7JUNG</span><span style="color: #DEE492">&quot;</span></span>
<span class="line"><span style="color: #F6F6F4">SECRET_ACCESS_KEY </span><span style="color: #F286C4">=</span><span style="color: #F6F6F4"> </span><span style="color: #DEE492">&quot;</span><span style="color: #E7EE98">f6+wDCaGIadoLdxlsE3d8DsnRv02c7jgo2</span><span style="color: #DEE492">&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #F6F6F4"># bucket info.  Leave </span><span style="color: #DEE492">&quot;</span><span style="color: #E7EE98">S3_FOLDER</span><span style="color: #DEE492">&quot;</span><span style="color: #F6F6F4"> value blank </span><span style="color: #F286C4">if</span><span style="color: #F6F6F4"> you want to start at the top level</span></span>
<span class="line"><span style="color: #F6F6F4">S3_BUCKET </span><span style="color: #F286C4">=</span><span style="color: #F6F6F4"> </span><span style="color: #DEE492">&quot;</span><span style="color: #E7EE98">yourBucketName</span><span style="color: #DEE492">&quot;</span></span>
<span class="line"><span style="color: #F6F6F4">S3_FOLDER </span><span style="color: #F286C4">=</span><span style="color: #F6F6F4"> </span><span style="color: #DEE492">&quot;&quot;</span></span></code></pre></div>



<p>In this script:</p>



<ul class="wp-block-list">
<li>Line 1-4: Your IAM credentials with proper permissions</li>



<li>Line 7: S3 bucket name</li>



<li>Line 8: Folder (S3 calls it a &#8220;Prefix&#8221;) below the bucket listed on line 7.  Add a value here only if you want to limit the script to search and delete from this folder (and below).</li>
</ul>



<h2 class="wp-block-heading">Listing Out the S3 Objects to be Deleted</h2>



<p>Now that your environment is set up and the AWS SDK is configured, let&#8217;s explore how to first list out the S3 objects you want to list.  Once we limit the list to what we want, we can go on to the next step and delete them.</p>



<p>Here&#8217;s how I went about listing the files I wanted to delete:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#f6f6f4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(251, 251, 239, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#333545;color:#ebebe6">list-all-s3-files.js</span><span role="button" tabindex="0" data-code="//this file lists the objects in an S3 bucket.  Max rows is 1000.

import 'dotenv/config';
import { S3Client, ListObjectsV2Command } from &quot;@aws-sdk/client-s3&quot;;

let client = new S3Client({
    region: process.env.S3_REGION,
    credentials: {
        accessKeyId: process.env.ACCESS_KEY_ID,
        secretAccessKey: process.env.SECRET_ACCESS_KEY
    }
});

const command = new ListObjectsV2Command({
    Bucket: process.env.S3_BUCKET,
    Prefix: process.env.S3_FOLDER,
    MaxKeys: 1000,
});

(async () =&gt; {

    const response = await client.send(command);

    // if you want to limit this list, add code here to change the &quot;response&quot; variable to only include files that fit

        //EXAMPLE 1 - reduce list to items between two dates
            // Define the date range for filtering
            //const startDate = new Date('2022-1-1');
            //const endDate = new Date('2023-1-1');
            // Filter the &quot;Contents&quot; array
            //const filteredContents = response.Contents.filter(item =&gt; {
            //    const lastModifiedDate = new Date(item.LastModified);
            //    return lastModifiedDate &gt;= startDate &amp;&amp; lastModifiedDate &lt;= endDate;
            //});
            // Update the &quot;Contents&quot; property in the response object
            //response.Contents = filteredContents;
        //EXAMPLE 1 END

        //EXAMPLE 2 - reduce file list to items with &quot;150&quot; in the file name
            const filteredContents = response.Contents.filter(item =&gt; item.Key.includes(&quot;150&quot;));
            // Update the &quot;Contents&quot; property in the response object
            response.Contents = filteredContents;
        //EXAMPLE 2 END

    //at this point we have the results in a single variable(&quot;response&quot;) with LastModified, Size, and StorageClass attributes included
    //console.log(response); //uncomment to see the full list

    // We just want the filename so we limit this list to get just the &quot;Key&quot; values
    const keys = response.Contents.map(item =&gt; item.Key).map(item =&gt; ({ Key: item }));
    console.log(keys);

})();

" style="color:#f6f6f4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dracula-soft" style="background-color: #282A36" tabindex="0"><code><span class="line"><span style="color: #7B7F8B">//this file lists the objects in an S3 bucket.  Max rows is 1000.</span></span>
<span class="line"></span>
<span class="line"><span style="color: #F286C4">import</span><span style="color: #F6F6F4"> </span><span style="color: #DEE492">&#39;</span><span style="color: #E7EE98">dotenv/config</span><span style="color: #DEE492">&#39;</span><span style="color: #F6F6F4">;</span></span>
<span class="line"><span style="color: #F286C4">import</span><span style="color: #F6F6F4"> { S3Client, ListObjectsV2Command } </span><span style="color: #F286C4">from</span><span style="color: #F6F6F4"> </span><span style="color: #DEE492">&quot;</span><span style="color: #E7EE98">@aws-sdk/client-s3</span><span style="color: #DEE492">&quot;</span><span style="color: #F6F6F4">;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #F286C4">let</span><span style="color: #F6F6F4"> client </span><span style="color: #F286C4">=</span><span style="color: #F6F6F4"> </span><span style="color: #F286C4; font-weight: bold">new</span><span style="color: #F6F6F4"> </span><span style="color: #62E884">S3Client</span><span style="color: #F6F6F4">({</span></span>
<span class="line"><span style="color: #F6F6F4">    region</span><span style="color: #F286C4">:</span><span style="color: #F6F6F4"> process.env.</span><span style="color: #BF9EEE">S3_REGION</span><span style="color: #F6F6F4">,</span></span>
<span class="line"><span style="color: #F6F6F4">    credentials</span><span style="color: #F286C4">:</span><span style="color: #F6F6F4"> {</span></span>
<span class="line"><span style="color: #F6F6F4">        accessKeyId</span><span style="color: #F286C4">:</span><span style="color: #F6F6F4"> process.env.</span><span style="color: #BF9EEE">ACCESS_KEY_ID</span><span style="color: #F6F6F4">,</span></span>
<span class="line"><span style="color: #F6F6F4">        secretAccessKey</span><span style="color: #F286C4">:</span><span style="color: #F6F6F4"> process.env.</span><span style="color: #BF9EEE">SECRET_ACCESS_KEY</span></span>
<span class="line"><span style="color: #F6F6F4">    }</span></span>
<span class="line"><span style="color: #F6F6F4">});</span></span>
<span class="line"></span>
<span class="line"><span style="color: #F286C4">const</span><span style="color: #F6F6F4"> command </span><span style="color: #F286C4">=</span><span style="color: #F6F6F4"> </span><span style="color: #F286C4; font-weight: bold">new</span><span style="color: #F6F6F4"> </span><span style="color: #62E884">ListObjectsV2Command</span><span style="color: #F6F6F4">({</span></span>
<span class="line"><span style="color: #F6F6F4">    Bucket</span><span style="color: #F286C4">:</span><span style="color: #F6F6F4"> process.env.</span><span style="color: #BF9EEE">S3_BUCKET</span><span style="color: #F6F6F4">,</span></span>
<span class="line"><span style="color: #F6F6F4">    Prefix</span><span style="color: #F286C4">:</span><span style="color: #F6F6F4"> process.env.</span><span style="color: #BF9EEE">S3_FOLDER</span><span style="color: #F6F6F4">,</span></span>
<span class="line"><span style="color: #F6F6F4">    MaxKeys</span><span style="color: #F286C4">:</span><span style="color: #F6F6F4"> </span><span style="color: #BF9EEE">1000</span><span style="color: #F6F6F4">,</span></span>
<span class="line"><span style="color: #F6F6F4">});</span></span>
<span class="line"></span>
<span class="line"><span style="color: #F6F6F4">(</span><span style="color: #F286C4">async</span><span style="color: #F6F6F4"> () </span><span style="color: #F286C4">=&gt;</span><span style="color: #F6F6F4"> {</span></span>
<span class="line"></span>
<span class="line"><span style="color: #F6F6F4">    </span><span style="color: #F286C4">const</span><span style="color: #F6F6F4"> response </span><span style="color: #F286C4">=</span><span style="color: #F6F6F4"> </span><span style="color: #F286C4">await</span><span style="color: #F6F6F4"> client.</span><span style="color: #62E884">send</span><span style="color: #F6F6F4">(command);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #F6F6F4">    </span><span style="color: #7B7F8B">// if you want to limit this list, add code here to change the &quot;response&quot; variable to only include files that fit</span></span>
<span class="line"></span>
<span class="line"><span style="color: #F6F6F4">        </span><span style="color: #7B7F8B">//EXAMPLE 1 - reduce list to items between two dates</span></span>
<span class="line"><span style="color: #F6F6F4">            </span><span style="color: #7B7F8B">// Define the date range for filtering</span></span>
<span class="line"><span style="color: #F6F6F4">            </span><span style="color: #7B7F8B">//const startDate = new Date(&#39;2022-1-1&#39;);</span></span>
<span class="line"><span style="color: #F6F6F4">            </span><span style="color: #7B7F8B">//const endDate = new Date(&#39;2023-1-1&#39;);</span></span>
<span class="line"><span style="color: #F6F6F4">            </span><span style="color: #7B7F8B">// Filter the &quot;Contents&quot; array</span></span>
<span class="line"><span style="color: #F6F6F4">            </span><span style="color: #7B7F8B">//const filteredContents = response.Contents.filter(item =&gt; {</span></span>
<span class="line"><span style="color: #F6F6F4">            </span><span style="color: #7B7F8B">//    const lastModifiedDate = new Date(item.LastModified);</span></span>
<span class="line"><span style="color: #F6F6F4">            </span><span style="color: #7B7F8B">//    return lastModifiedDate &gt;= startDate &amp;&amp; lastModifiedDate &lt;= endDate;</span></span>
<span class="line"><span style="color: #F6F6F4">            </span><span style="color: #7B7F8B">//});</span></span>
<span class="line"><span style="color: #F6F6F4">            </span><span style="color: #7B7F8B">// Update the &quot;Contents&quot; property in the response object</span></span>
<span class="line"><span style="color: #F6F6F4">            </span><span style="color: #7B7F8B">//response.Contents = filteredContents;</span></span>
<span class="line"><span style="color: #F6F6F4">        </span><span style="color: #7B7F8B">//EXAMPLE 1 END</span></span>
<span class="line"></span>
<span class="line"><span style="color: #F6F6F4">        </span><span style="color: #7B7F8B">//EXAMPLE 2 - reduce file list to items with &quot;150&quot; in the file name</span></span>
<span class="line"><span style="color: #F6F6F4">            </span><span style="color: #F286C4">const</span><span style="color: #F6F6F4"> filteredContents </span><span style="color: #F286C4">=</span><span style="color: #F6F6F4"> response.Contents.</span><span style="color: #62E884">filter</span><span style="color: #F6F6F4">(</span><span style="color: #FFB86C; font-style: italic">item</span><span style="color: #F6F6F4"> </span><span style="color: #F286C4">=&gt;</span><span style="color: #F6F6F4"> item.Key.</span><span style="color: #62E884">includes</span><span style="color: #F6F6F4">(</span><span style="color: #DEE492">&quot;</span><span style="color: #E7EE98">150</span><span style="color: #DEE492">&quot;</span><span style="color: #F6F6F4">));</span></span>
<span class="line"><span style="color: #F6F6F4">            </span><span style="color: #7B7F8B">// Update the &quot;Contents&quot; property in the response object</span></span>
<span class="line"><span style="color: #F6F6F4">            response.Contents </span><span style="color: #F286C4">=</span><span style="color: #F6F6F4"> filteredContents;</span></span>
<span class="line"><span style="color: #F6F6F4">        </span><span style="color: #7B7F8B">//EXAMPLE 2 END</span></span>
<span class="line"></span>
<span class="line"><span style="color: #F6F6F4">    </span><span style="color: #7B7F8B">//at this point we have the results in a single variable(&quot;response&quot;) with LastModified, Size, and StorageClass attributes included</span></span>
<span class="line"><span style="color: #F6F6F4">    </span><span style="color: #7B7F8B">//console.log(response); //uncomment to see the full list</span></span>
<span class="line"></span>
<span class="line"><span style="color: #F6F6F4">    </span><span style="color: #7B7F8B">// We just want the filename so we limit this list to get just the &quot;Key&quot; values</span></span>
<span class="line"><span style="color: #F6F6F4">    </span><span style="color: #F286C4">const</span><span style="color: #F6F6F4"> keys </span><span style="color: #F286C4">=</span><span style="color: #F6F6F4"> response.Contents.</span><span style="color: #62E884">map</span><span style="color: #F6F6F4">(</span><span style="color: #FFB86C; font-style: italic">item</span><span style="color: #F6F6F4"> </span><span style="color: #F286C4">=&gt;</span><span style="color: #F6F6F4"> item.Key).</span><span style="color: #62E884">map</span><span style="color: #F6F6F4">(</span><span style="color: #FFB86C; font-style: italic">item</span><span style="color: #F6F6F4"> </span><span style="color: #F286C4">=&gt;</span><span style="color: #F6F6F4"> ({ Key</span><span style="color: #F286C4">:</span><span style="color: #F6F6F4"> item }));</span></span>
<span class="line"><span style="color: #F6F6F4">    console.</span><span style="color: #62E884">log</span><span style="color: #F6F6F4">(keys);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #F6F6F4">})();</span></span>
<span class="line"></span>
<span class="line"></span></code></pre></div>



<p>In this script:</p>



<ul class="wp-block-list">
<li>Line 3-4: Import the libraries</li>



<li>Line 6-12: Create the connection to AWS and authenticate using the credentials in your <strong>.env</strong> file</li>



<li>Line 14-18: Create the command that you&#8217;ll send to AWS to retrieve all S3 objects</li>



<li>Line 22: Send the request to AWS and put the values returned in the &#8220;<strong>response</strong>&#8221; variable</li>



<li>Line 26-37: Example code if you want to reduce the file list based on dates</li>



<li>Line 39-43: Example code if you want to reduce the file list based on a text value in the file name.  Comment out if not needed</li>



<li>Line 49: This line extracts the file name (&#8220;<strong>Key</strong>&#8220;) value from the JavaScript object returned and puts it in a format to copy for deletion.</li>



<li>Line 50: Logs the list of Keys in the console.</li>
</ul>



<p>Run this script alone to get the full list of objects to be deleted.</p>



<h2 class="wp-block-heading">Deleting Multiple Objects With S3 DeleteObject</h2>



<p>Now that you have the file list you want to delete, let&#8217;s explore how to delete multiple S3 objects efficiently. To delete multiple objects, you can use the <strong>deleteObjects</strong> method provided by the AWS SDK for JavaScript.</p>



<p>Here&#8217;s a sample script to delete multiple objects from an S3 bucket:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#f6f6f4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(251, 251, 239, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#333545;color:#ebebe6">delete-multiple-s3-files.js</span><span role="button" tabindex="0" data-code="import 'dotenv/config';
import { DeleteObjectsCommand, S3Client } from &quot;@aws-sdk/client-s3&quot;;

let client = new S3Client({
    region: process.env.S3_REGION,
    credentials: {
        accessKeyId: process.env.ACCESS_KEY_ID,
        secretAccessKey: process.env.SECRET_ACCESS_KEY
    }
});

const command = new DeleteObjectsCommand({
    Bucket: process.env.S3_BUCKET,
    Delete: {
        Objects: [
            {Key: &quot;my-random-image.jpg&quot;}, // if in a directory: &quot;directory_name/file.ext&quot;
            {Key: &quot;wp-content/uploads/2022/08/19185558/some-other-random-image.jpg&quot;},
            {Key: &quot;wp-content/uploads/2023/05/19182148/another-random-image.jpg&quot;}
        ],
    }
});

(async () =&gt; {

    const response = await client.send(command);
    console.log(response);

})();
" style="color:#f6f6f4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dracula-soft" style="background-color: #282A36" tabindex="0"><code><span class="line"><span style="color: #F286C4">import</span><span style="color: #F6F6F4"> </span><span style="color: #DEE492">&#39;</span><span style="color: #E7EE98">dotenv/config</span><span style="color: #DEE492">&#39;</span><span style="color: #F6F6F4">;</span></span>
<span class="line"><span style="color: #F286C4">import</span><span style="color: #F6F6F4"> { DeleteObjectsCommand, S3Client } </span><span style="color: #F286C4">from</span><span style="color: #F6F6F4"> </span><span style="color: #DEE492">&quot;</span><span style="color: #E7EE98">@aws-sdk/client-s3</span><span style="color: #DEE492">&quot;</span><span style="color: #F6F6F4">;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #F286C4">let</span><span style="color: #F6F6F4"> client </span><span style="color: #F286C4">=</span><span style="color: #F6F6F4"> </span><span style="color: #F286C4; font-weight: bold">new</span><span style="color: #F6F6F4"> </span><span style="color: #62E884">S3Client</span><span style="color: #F6F6F4">({</span></span>
<span class="line"><span style="color: #F6F6F4">    region</span><span style="color: #F286C4">:</span><span style="color: #F6F6F4"> process.env.</span><span style="color: #BF9EEE">S3_REGION</span><span style="color: #F6F6F4">,</span></span>
<span class="line"><span style="color: #F6F6F4">    credentials</span><span style="color: #F286C4">:</span><span style="color: #F6F6F4"> {</span></span>
<span class="line"><span style="color: #F6F6F4">        accessKeyId</span><span style="color: #F286C4">:</span><span style="color: #F6F6F4"> process.env.</span><span style="color: #BF9EEE">ACCESS_KEY_ID</span><span style="color: #F6F6F4">,</span></span>
<span class="line"><span style="color: #F6F6F4">        secretAccessKey</span><span style="color: #F286C4">:</span><span style="color: #F6F6F4"> process.env.</span><span style="color: #BF9EEE">SECRET_ACCESS_KEY</span></span>
<span class="line"><span style="color: #F6F6F4">    }</span></span>
<span class="line"><span style="color: #F6F6F4">});</span></span>
<span class="line"></span>
<span class="line"><span style="color: #F286C4">const</span><span style="color: #F6F6F4"> command </span><span style="color: #F286C4">=</span><span style="color: #F6F6F4"> </span><span style="color: #F286C4; font-weight: bold">new</span><span style="color: #F6F6F4"> </span><span style="color: #62E884">DeleteObjectsCommand</span><span style="color: #F6F6F4">({</span></span>
<span class="line"><span style="color: #F6F6F4">    Bucket</span><span style="color: #F286C4">:</span><span style="color: #F6F6F4"> process.env.</span><span style="color: #BF9EEE">S3_BUCKET</span><span style="color: #F6F6F4">,</span></span>
<span class="line"><span style="color: #F6F6F4">    Delete</span><span style="color: #F286C4">:</span><span style="color: #F6F6F4"> {</span></span>
<span class="line"><span style="color: #F6F6F4">        Objects</span><span style="color: #F286C4">:</span><span style="color: #F6F6F4"> [</span></span>
<span class="line"><span style="color: #F6F6F4">            {Key</span><span style="color: #F286C4">:</span><span style="color: #F6F6F4"> </span><span style="color: #DEE492">&quot;</span><span style="color: #E7EE98">my-random-image.jpg</span><span style="color: #DEE492">&quot;</span><span style="color: #F6F6F4">}, </span><span style="color: #7B7F8B">// if in a directory: &quot;directory_name/file.ext&quot;</span></span>
<span class="line"><span style="color: #F6F6F4">            {Key</span><span style="color: #F286C4">:</span><span style="color: #F6F6F4"> </span><span style="color: #DEE492">&quot;</span><span style="color: #E7EE98">wp-content/uploads/2022/08/19185558/some-other-random-image.jpg</span><span style="color: #DEE492">&quot;</span><span style="color: #F6F6F4">},</span></span>
<span class="line"><span style="color: #F6F6F4">            {Key</span><span style="color: #F286C4">:</span><span style="color: #F6F6F4"> </span><span style="color: #DEE492">&quot;</span><span style="color: #E7EE98">wp-content/uploads/2023/05/19182148/another-random-image.jpg</span><span style="color: #DEE492">&quot;</span><span style="color: #F6F6F4">}</span></span>
<span class="line"><span style="color: #F6F6F4">        ],</span></span>
<span class="line"><span style="color: #F6F6F4">    }</span></span>
<span class="line"><span style="color: #F6F6F4">});</span></span>
<span class="line"></span>
<span class="line"><span style="color: #F6F6F4">(</span><span style="color: #F286C4">async</span><span style="color: #F6F6F4"> () </span><span style="color: #F286C4">=&gt;</span><span style="color: #F6F6F4"> {</span></span>
<span class="line"></span>
<span class="line"><span style="color: #F6F6F4">    </span><span style="color: #F286C4">const</span><span style="color: #F6F6F4"> response </span><span style="color: #F286C4">=</span><span style="color: #F6F6F4"> </span><span style="color: #F286C4">await</span><span style="color: #F6F6F4"> client.</span><span style="color: #62E884">send</span><span style="color: #F6F6F4">(command);</span></span>
<span class="line"><span style="color: #F6F6F4">    console.</span><span style="color: #62E884">log</span><span style="color: #F6F6F4">(response);</span></span>
<span class="line"></span>
<span class="line"><span style="color: #F6F6F4">})();</span></span>
<span class="line"></span></code></pre></div>



<p>I&#8217;ve purposely kept this script&#8217;s object list manual since I didn&#8217;t want anyone to inadvertently delete more than they wanted.  It&#8217;s easy enough to automate yourself, or <a href="https://blog.gravyware.com/contact" target="_blank" data-type="link" data-id="https://blog.gravyware.com/contact" rel="noreferrer noopener">you can ask me</a> how to do it.</p>



<p>You&#8217;ll want to replace your list with the list I have on<strong> lines 16-18</strong>.  Just specify the directory and filename.</p>



<p>In this script:</p>



<ul class="wp-block-list">
<li>Line 1-2: Import the libraries</li>



<li>Line 4-10: Create the connection to AWS and authenticate using the credentials in your <strong>.env</strong> file</li>



<li>Line 12-21: Create the command that you&#8217;ll send to AWS to define which S3 objects to delete</li>



<li><mark style="background-color:rgba(0, 0, 0, 0);color:#ff0000" class="has-inline-color">Line 16-18</mark>: Replace these lines with the full list of the files you want deleted.  You would have this list from the response that &#8220;<strong>list-all-s3-files.js</strong>&#8221; returned.  <strong>Make sure it&#8217;s formatted correctly</strong>.</li>



<li>Line 23-28: Send the delete request to AWS and display the response in the console.</li>
</ul>



<p>Run this script alone and all items you listed should get deleted.</p>



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



<p>This is a quick and easy way to efficiently delete multiple S3 objects using the AWS SDK for JavaScript in your Node.js application. This can be particularly useful for automating cleanup tasks and managing your S3 resources more effectively.</p>



<p>Also, if you want information on how to set up<a href="https://blog.gravyware.com/what-is-ec2-setup-a-web-server-tutorial-in-aws"> your own web server in AWS</a>, we&#8217;ve done that plenty of times too!</p>



<p>Good luck!</p>



<p></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>100 Largest Public SaaS Companies</title>
		<link>https://blog.gravyware.com/100-largest-public-saas-companies</link>
		
		<dc:creator><![CDATA[David Garthe]]></dc:creator>
		<pubDate>Fri, 14 Apr 2023 19:04:38 +0000</pubDate>
				<category><![CDATA[Finance]]></category>
		<guid isPermaLink="false">https://blog.gravyware.com/?p=3288</guid>

					<description><![CDATA[Software-as-a-Service (SaaS) has become an increasingly popular way for companies to access and use software applications.

The size of a company can indicate its market strength and stability. Listed are the top 100 largest publicly-traded SaaS companies.]]></description>
										<content:encoded><![CDATA[
<p>Software-as-a-Service (SaaS) has become an increasingly popular way for companies to access and use software applications.</p>



<p>The size of a company can indicate its market strength and stability. Listed are the top 100 largest publicly-traded SaaS companies.</p>



<p>These SaaS companies represent various products and services, from cybersecurity and cloud computing to HR management and marketing automation. While many large public companies offer SaaS products, this list is defined as <strong>companies with the majority of their revenue (&gt;50%)</strong>  from SaaS products.</p>



<ul class="has-theme-palette-7-background-color has-background has-medium-font-size wp-block-list">
<li>This list is reviewed and updated every week.</li>



<li>The stock quotes &amp; market capitalization values are updated every 15 minutes.</li>
</ul>



<h2 class="wp-block-heading">The SaaS Companies List</h2>


<stock-market-widget type="table-quotes" template="basic" assets="CRM,ADBE,INTU,NOW,SHOP,WDAY,SNOW,ADSK,SQ,TEAM,CRWD,VEEV,ZM,NET,DDOG,HUBS,IOT,PAYC,PLTR,MDB,HCP,GTLB,S,QLYS,APPF,FRSH,PYCR,ASAN,AYX,BOX,BL,DOCN,SPT,RNG,SUMO,SEMR,QTWO,EVBG,YEXT,MCHX,DOCU,TWLO,DBX,OKTA,ZS,ACIW,ANET,ASUR,BILL,CTSH,GPN,OTEX,PEGA,WK,MNTV,MSFT,ORCL,CVT,DOMO,ADP,VMW,NEWR,PAYX,ZUO,COUP,BLKB,SPLK,RPD,KHOTF,SAP,ZI,AKAM,TOST,MNDY,SMAR,AI,EVCM,LPSN,WKME,BASE,VERI" fields="logo_name_symbol,market_cap,change_pct" links="{'CRM':{},'ADBE':{},'INTU':{},'NOW':{},'SHOP':{},'WDAY':{},'SNOW':{},'ADSK':{},'SQ':{},'TEAM':{},'CRWD':{},'VEEV':{},'ZM':{},'NET':{},'DDOG':{},'HUBS':{},'IOT':{},'PAYC':{},'PLTR':{},'MDB':{},'HCP':{},'GTLB':{},'S':{},'QLYS':{},'APPF':{},'FRSH':{},'PYCR':{},'ASAN':{},'AYX':{},'BOX':{},'BL':{},'DOCN':{},'SPT':{},'RNG':{},'SUMO':{},'SEMR':{},'QTWO':{},'EVBG':{},'YEXT':{},'MCHX':{},'DOCU':{},'TWLO':{},'DBX':{},'OKTA':{},'ZS':{},'ACIW':{},'ANET':{},'ASUR':{},'BILL':{},'CTSH':{},'GPN':{},'OTEX':{},'PEGA':{},'WK':{},'MNTV':{},'MSFT':{},'ORCL':{},'CVT':{},'DOMO':{},'ADP':{},'VMW':{},'NEWR':{},'PAYX':{},'ZUO':{},'COUP':{},'BLKB':{},'SPLK':{},'RPD':{},'KHOTF':{},'SAP':{},'ZI':{},'AKAM':{},'TOST':{},'MNDY':{},'SMAR':{},'AI':{},'EVCM':{},'LPSN':{},'WKME':{},'BASE':{},'VERI':{}}" display_header="true" display_chart="false" display_currency_symbol="true" pagination="false" search="false" rows_per_page="100" sort_field="market_cap" sort_direction="desc" alignment="left" api="yf"></stock-market-widget>



<p></p>



<p>The SaaS industry is expected to continue growing in the coming years, as more businesses adopt cloud-based software solutions. With the rise of remote work and digital transformation, SaaS companies are in a unique position to provide businesses with the tools they need to succeed in the digital age.</p>



<p></p>



<p></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>The Best Venture Capital Firms (2023)</title>
		<link>https://blog.gravyware.com/best-venture-capital-firms</link>
		
		<dc:creator><![CDATA[David Garthe]]></dc:creator>
		<pubDate>Sun, 01 Jan 2023 18:36:10 +0000</pubDate>
				<category><![CDATA[Finance]]></category>
		<guid isPermaLink="false">https://blog.gravyware.com/?p=2862</guid>

					<description><![CDATA[Venture capital is a popular option for early-stage companies, especially those businesses in the internet and mobile markets.  We've compiled the best venture capital firms for you.]]></description>
										<content:encoded><![CDATA[
<p>Let’s talk about funding.&nbsp; If you have a startup or are considering starting a startup, you might be in a situation where you need cash to support the business.</p>



<p>Venture capital is a popular option for early-stage companies, especially those businesses in the internet and mobile markets. This type of funding is typically provided by investment firms or individual investors who are looking to invest in high-growth businesses.  But who are the best venture capital firms?</p>



<h2 class="wp-block-heading">Benefits of Venture Capital</h2>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://blog.gravyware.com/wp-content/uploads/2023/01/moneyPile2.png" alt="Best Venture Capital Firms - Benefits of Venture Capital" class="wp-image-2892" width="631" height="599"/></figure>



<p>The advantage of venture capital is that it can <strong>provide a lot of growth capital</strong> for businesses.&nbsp; They most likely have staff members that have built startups as well and will provide advice on the various challenges you may face.</p>



<p>This is important as the top VC firms can be great partners to your business.  Smart VC firms want to help solve meaningful problems with all of their assets.</p>



<p>The right firms may be able to pair your company with other companies they own in order to create a much stronger competitive business. This is not the only reason to choose one VC firm over another but strong business partnerships should always be considered.</p>



<p>Think of taking money from a VC as a marriage… if you pick the wrong partner, you’re in for a rocky relationship pretty quickly.</p>



<p></p>



<h2 class="wp-block-heading">Negatives of Venture Capital</h2>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="753" src="https://blog.gravyware.com/wp-content/uploads/2023/01/doMoreScreen-1024x753.png" alt="Negatives of Venture Capital" class="wp-image-2880" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/doMoreScreen-1024x753.png 1024w, https://blog.gravyware.com/wp-content/uploads/2023/01/doMoreScreen-300x221.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/doMoreScreen-768x565.png 768w, https://blog.gravyware.com/wp-content/uploads/2023/01/doMoreScreen.png 1130w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>The <strong>downside to venture capital</strong> is that they typically want a significant equity stake (and board of director seats) in the business.  This means giving up a certain amount of control in the company you created.</p>



<p>Think seriously about this since many startup founders have been forced out or fired from their own businesses when the Board feels another CEO could do better. In fact, this is more commonly the norm than the exception, so be prepared to work your butt off for your new partners.</p>



<p>You may not even be doing a bad job of running the company.  They may just have a more preferred person that they want leading their company.  This kind of switch often leaves a founder completely shocked and surprised.</p>



<p>Founders may be most interested in product development, but investors tend to prioritize revenue and ROI.  Investors can lose patience fairly quickly when large amounts of money are involved.  Try not to give them a reason to replace you.</p>



<p></p>



<h2 class="wp-block-heading">Why Go With the Best Venture Capital Firms?</h2>



<p>Experience does matter.  Think twice about going with a small VC firm as opposed to one of the large ones.</p>



<ul class="wp-block-list">
<li>Large firms know what it takes to succeed and tend to have better track records.</li>



<li>Large firms will have a more established network that they can tap into to help you succeed.</li>



<li>Large firms can pair you up easier with other companies to increase your market share.</li>



<li>Large firms will have a more established team to help with a sale. This is incredibly important.</li>
</ul>



<p>This is not to say you can&#8217;t find success with smaller firms.  But the large firms we list are the biggest for a reason.  They get results, and that is what you want.</p>



<p>Maximize your chances for success.</p>



<p></p>



<h2 class="wp-block-heading">The Leading Venture Capital Firm List</h2>



<p>If you&#8217;re still interested in who are the best VC firms, keep reading. Be sure to also read the post about <a href="https://blog.gravyware.com/the-best-startup-blogs-to-grow-your-business" target="_blank" rel="noreferrer noopener">the best startup blogs to follow to quickly grow your SaaS business</a> since there are VC blogs mentioned in there as well.</p>



<p></p>



<h3 class="wp-block-heading">Accel</h3>



<div class="wp-block-media-text is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="494" src="https://blog.gravyware.com/wp-content/uploads/2023/01/accelScreenShot.png" alt="Accel" class="wp-image-2929 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/accelScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/accelScreenShot-300x185.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/accelScreenShot-768x474.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure><div class="wp-block-media-text__content">
<p><a href="https://www.accel.com/" target="_blank" rel="noreferrer noopener nofollow">https://www.accel.com</a></p>



<p>Accel is one of the top venture capital firms in the world with offices located in Palo Alto, London, Bangalore, New York, and Beijing.</p>



<p>Accel provides early-stage funding and growth capital to startups across a wide range of industries.</p>



<p>The firm has notable investments in leading companies such as Atlassian, Etsy, Facebook, Rovio, and Trulia.</p>
</div></div>



<p></p>



<h3 class="wp-block-heading">Andreessen Horowitz</h3>



<div class="wp-block-media-text has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><div class="wp-block-media-text__content">
<p><a href="https://a16z.com" target="_blank" rel="noreferrer noopener nofollow">https://a16z.com</a></p>



<p>Andreessen Horowitz (often referred to as “a16z”) is a leading venture capital firm founded in 2009 by Marc Andreessen and Ben Horowitz.</p>



<p>The firm manages approximately $30 billion of assets, making it one of the largest and most active venture capital firms in the world.</p>



<p>They have made notable investments in some of the most successful tech startups of the past decade, including Facebook, Airbnb, Lyft, and okta.</p>
</div><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="471" src="https://blog.gravyware.com/wp-content/uploads/2023/01/a16zScreenShot.png" alt="Andreessen Horowitz" class="wp-image-2928 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/a16zScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/a16zScreenShot-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/a16zScreenShot-768x452.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure></div>



<p></p>



<h3 class="wp-block-heading">Benchmark</h3>



<div class="wp-block-media-text is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="471" src="https://blog.gravyware.com/wp-content/uploads/2023/01/benchmarkScreenShot.png" alt="Benchmark Capital" class="wp-image-2927 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/benchmarkScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/benchmarkScreenShot-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/benchmarkScreenShot-768x452.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure><div class="wp-block-media-text__content">
<p><a href="http://www.benchmark.com" target="_blank" rel="noreferrer noopener nofollow">https://www.benchmark.com</a></p>



<p>Benchmark is a venture capital firm based in San Francisco that focuses on early-stage investing.  They have over $100 billion in assets under management, making them the largest firm on this list.</p>



<p>Founded in 1995, the firm has invested in some of the most successful tech startups, such as eBay, Uber, Snapchat, Instagram, and Dropbox.</p>



<p>Benchmark&#8217;s investments span a variety of sectors including consumer, enterprise, and healthcare technology.</p>
</div></div>



<p></p>



<h3 class="wp-block-heading">Bessemer Venture Partners</h3>



<div class="wp-block-media-text has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><div class="wp-block-media-text__content">
<p><a href="https://www.bvp.com" target="_blank" rel="noreferrer noopener nofollow">https://www.bvp.com</a></p>



<p>Bessemer Venture Partners is a global venture capital firm with offices in the United States, India, and Israel. Founded in 1911, it was one of the first venture capital firms in the world.</p>



<p>Bessemer&#8217;s investments cover a variety of sectors from financial services to healthcare technology and consumer products.</p>



<p>Some of its most successful investments include LinkedIn, Yelp, Pinterest, Twilio, and Wix.</p>
</div><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="471" src="https://blog.gravyware.com/wp-content/uploads/2023/01/bessemerScreenShot.png" alt="Bessemer Venture Partners" class="wp-image-2926 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/bessemerScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/bessemerScreenShot-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/bessemerScreenShot-768x452.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure></div>



<p></p>



<h3 class="wp-block-heading">Canaan Partners</h3>



<div class="wp-block-media-text is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="471" src="https://blog.gravyware.com/wp-content/uploads/2023/01/canaanScreenShot.png" alt="Canaan Partners" class="wp-image-2925 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/canaanScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/canaanScreenShot-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/canaanScreenShot-768x452.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure><div class="wp-block-media-text__content">
<p><a href="http://www.canaan.com" target="_blank" rel="noreferrer noopener nofollow">https://www.canaan.com</a></p>



<p>Canaan Partners is a venture capital firm that invests in early and growth-stage companies across a variety of industries.</p>



<p>Founded in 1987, it has invested in more than 300 startups, including Ancestry.com, ZipCar, DocuSign, and Brightcove.</p>



<p>Canaan&#8217;s investment portfolio covers sectors such as healthcare technology, financial services, consumer products, and enterprise software.</p>
</div></div>



<p></p>



<h3 class="wp-block-heading">Dragoneer Investment Group</h3>



<div class="wp-block-media-text has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><div class="wp-block-media-text__content">
<p><a href="http://dragoneer.com" target="_blank" rel="noreferrer noopener nofollow">https://dragoneer.com</a></p>



<p>Dragoneer Investment Group is a venture capital firm headquartered in San Francisco. They have $25 billion in assets under management.</p>



<p>Founded in 1999, it has investments across industries such as consumer technology, enterprise software, and healthcare technology.</p>



<p>Dragoneer’s most successful investments include DoorDash, Etsy, Atlassian, and Uber.</p>
</div><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="471" src="https://blog.gravyware.com/wp-content/uploads/2023/01/dragoneerScreenShot.png" alt="Dragoneer Investment Group" class="wp-image-2924 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/dragoneerScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/dragoneerScreenShot-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/dragoneerScreenShot-768x452.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure></div>



<p></p>



<h3 class="wp-block-heading">Founders Fund</h3>



<div class="wp-block-media-text is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="471" src="https://blog.gravyware.com/wp-content/uploads/2023/01/foundersFundScreenShot.png" alt="Founders Fund" class="wp-image-2923 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/foundersFundScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/foundersFundScreenShot-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/foundersFundScreenShot-768x452.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure><div class="wp-block-media-text__content">
<p><a href="http://www.foundersfund.com" target="_blank" rel="noreferrer noopener nofollow">https://www.foundersfund.com</a></p>



<p>Founders Fund is a venture firm based in San Francisco that focuses on early-stage venture capital investments.</p>



<p>With $11 billion under management, it was founded in 2005 by <a href="https://en.wikipedia.org/wiki/Peter_Thiel" target="_blank" rel="noreferrer noopener">Peter Thiel</a>, and has made investments in companies such as Facebook, SpaceX, Lyft, and Airbnb.</p>



<p>The firm invests across various industries including healthcare, artificial intelligence, and robotics. Founders Fund also provides operational advice to its portfolio companies.</p>
</div></div>



<p></p>



<h3 class="wp-block-heading">GGV Capital</h3>



<div class="wp-block-media-text has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><div class="wp-block-media-text__content">
<p><a href="http://www.ggvc.com" target="_blank" rel="noreferrer noopener nofollow">https://www.ggvc.com</a></p>



<p>GGV Capital is a venture capital firm with offices in Silicon Valley, China, and Southeast Asia. It currently has nearly $10 billion in assets under management.</p>



<p>Founded in 2000, the firm invests in early-stage startups across various sectors including consumer technology, enterprise software, healthcare technology, and artificial intelligence.</p>



<p>It has investments in companies such as Airbnb, slack, and Alibaba.</p>
</div><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="471" src="https://blog.gravyware.com/wp-content/uploads/2023/01/ggvcScreenShot.png" alt="GGV Capital" class="wp-image-2922 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/ggvcScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/ggvcScreenShot-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/ggvcScreenShot-768x452.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure></div>



<p></p>



<h3 class="wp-block-heading">Greylock Partners</h3>



<div class="wp-block-media-text is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="471" src="https://blog.gravyware.com/wp-content/uploads/2023/01/greylockScreenShot.png" alt="Greylock Partners" class="wp-image-2921 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/greylockScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/greylockScreenShot-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/greylockScreenShot-768x452.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure><div class="wp-block-media-text__content">
<p><a href="http://www.greylock.com" target="_blank" rel="noreferrer noopener nofollow">https://www.greylock.com</a></p>



<p>Greylock Partners is a venture capital firm that invests in early-stage startups in the technology industry. They have $3.5 billion in assets.</p>



<p>Founded in 1965, Greylock has invested in companies such as Airbnb, Coinbase, Facebook, and Figma.</p>



<p>The firm has offices located in Silicon Valley and Boston and focuses on investments across enterprise software, enterprise infrastructure, consumer products, and healthcare technology sectors.</p>
</div></div>



<p></p>



<h3 class="wp-block-heading">GV</h3>



<div class="wp-block-media-text has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><div class="wp-block-media-text__content">
<p><a href="https://www.gv.com" target="_blank" rel="noreferrer noopener nofollow">https://www.gv.com</a></p>



<p>GV (formerly Google Ventures) is the venture capital investment arm of Alphabet, the parent company of Google. They were founded in 2009 and headquartered in Mountain View, California. They operate independently of Google.</p>



<p>It invests across sectors such as consumer technology, enterprise software, and healthcare technology. They currently have approximately $8 billion in assets under management.</p>



<p>Some of GV’s notable investments include Uber, 23andMe, and HubSpot.</p>
</div><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="471" src="https://blog.gravyware.com/wp-content/uploads/2023/01/gvScreenShot.png" alt="GV formerly Google Ventures" class="wp-image-2920 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/gvScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/gvScreenShot-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/gvScreenShot-768x452.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure></div>



<p></p>



<h3 class="wp-block-heading">Index Ventures</h3>



<div class="wp-block-media-text is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="471" src="https://blog.gravyware.com/wp-content/uploads/2023/01/indexVenturesScreenShot.png" alt="Index Ventures" class="wp-image-2919 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/indexVenturesScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/indexVenturesScreenShot-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/indexVenturesScreenShot-768x452.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure><div class="wp-block-media-text__content">
<p><a href="http://www.indexventures.com" target="_blank" rel="noreferrer noopener nofollow">https://www.indexventures.com</a></p>



<p>Index Ventures is a European venture capital firm that invests in early and growth-stage startups across the technology industry.</p>



<p>Founded in 1996, it has offices located in London, San Francisco, and Geneva. They have assets of approximately 2 billion Euros.</p>



<p>The firm’s notable investments span a variety of sectors including enterprise software, consumer products, and healthcare technology. Some of its most successful investments include Dropbox, Facebook, MySQL, Etsy, and Zendesk.</p>
</div></div>



<p></p>



<h3 class="wp-block-heading">Intel Capital</h3>



<div class="wp-block-media-text has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><div class="wp-block-media-text__content">
<p><a href="http://www.intelcapital.com" target="_blank" rel="noreferrer noopener nofollow">https://www.intelcapital.com</a></p>



<p>Intel Capital is the venture capital arm of tech giant Intel.</p>



<p>Founded in 1991, it has invested in more than 1,600 startups across a variety of industries including artificial intelligence, cloud computing, and robotics.</p>



<p>Its notable investments span sectors such as consumer products, enterprise software, and healthcare startups. Some invested companies include WebMD, MySQL, Box, Inktomi, and LogMeIn.</p>
</div><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="471" src="https://blog.gravyware.com/wp-content/uploads/2023/01/intelCapitalScreenShot.png" alt="Intel Capital" class="wp-image-2918 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/intelCapitalScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/intelCapitalScreenShot-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/intelCapitalScreenShot-768x452.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure></div>



<p></p>



<h3 class="wp-block-heading">Insight Partners</h3>



<div class="wp-block-media-text is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="471" src="https://blog.gravyware.com/wp-content/uploads/2023/01/insightPartnersScreenShot.png" alt="Insight Partners" class="wp-image-2917 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/insightPartnersScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/insightPartnersScreenShot-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/insightPartnersScreenShot-768x452.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure><div class="wp-block-media-text__content">
<p><a href="https://www.insightpartners.com" target="_blank" rel="noreferrer noopener nofollow">https://www.insightpartners.com</a></p>



<p>Insight Partners is a venture capital firm with offices located in London and New York. They have an incredible $97 billion in assets under management.</p>



<p>Founded in 1995, they focus on investments across sectors such as consumer technology, enterprise software, and healthcare technology.</p>



<p>Insight’s successful investments include Monday.com, WalkMe, Wix, Udemy, and Shutterstock.</p>
</div></div>



<p></p>



<h3 class="wp-block-heading">IVP</h3>



<div class="wp-block-media-text has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><div class="wp-block-media-text__content">
<p><a href="http://www.ivp.com" target="_blank" rel="noreferrer noopener nofollow">https://www.ivp.com</a></p>



<p>IVP is a venture capital firm with offices located in Menlo Park and San Francisco. They have approximately $8.7 billion in assets under management and focus on both growth fund and later-stage investments.</p>



<p>Founded in 1980, it has made notable investments in over 400 companies across various sectors including consumer products, enterprise software, and healthcare technology.</p>



<p>IVP&#8217;s most successful investments include Snap, Slack, Coinbase, Twitter, and DataDog.</p>
</div><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="471" src="https://blog.gravyware.com/wp-content/uploads/2023/01/ivpScreenShot.png" alt="IVP investment firm" class="wp-image-2916 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/ivpScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/ivpScreenShot-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/ivpScreenShot-768x452.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure></div>



<p></p>



<h3 class="wp-block-heading">Khosla Ventures</h3>



<div class="wp-block-media-text is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="471" src="https://blog.gravyware.com/wp-content/uploads/2023/01/khoslaScreenShot.png" alt="Khosla Ventures" class="wp-image-2936 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/khoslaScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/khoslaScreenShot-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/khoslaScreenShot-768x452.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure><div class="wp-block-media-text__content">
<p><a href="http://khoslaventures.com" target="_blank" rel="noreferrer noopener nofollow">https://khoslaventures.com</a></p>



<p>Khosla Ventures is a venture capital firm founded in 2004 by Vinod Khosla. They have approximately $15 billion in assets under management.</p>



<p>It has offices located in Menlo Park and San Francisco and focuses on investments across sectors such as consumer products, enterprise software, and healthcare technology.</p>



<p>Some notable investments include Square, DoorDash, and Instacart.</p>
</div></div>



<p></p>



<p></p>



<h3 class="wp-block-heading">Kleiner Perkins</h3>



<div class="wp-block-media-text has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><div class="wp-block-media-text__content">
<p><a href="https://www.kleinerperkins.com" target="_blank" rel="noreferrer noopener nofollow">https://www.kleinerperkins.com</a></p>



<p>Kleiner Perkins is a venture capital firm that invests in early and growth-stage technology companies.</p>



<p>Founded in 1972, it is one of the oldest and most successful venture capital firms in the world.</p>



<p>They have offices located in Menlo Park, San Francisco, Beijing, and Shanghai. Investments span various industries including enterprise software, consumer products, and healthcare technology.</p>



<p>Kleiner Perkins’ most successful investments include Amazon, Google, Netscape, Cisco, Intuit, Sun Microsystems, and Genentech.</p>
</div><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="471" src="https://blog.gravyware.com/wp-content/uploads/2023/01/kleinerPerkinsScreenShot.png" alt="Kleiner Perkins" class="wp-image-2935 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/kleinerPerkinsScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/kleinerPerkinsScreenShot-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/kleinerPerkinsScreenShot-768x452.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure></div>



<p></p>



<h3 class="wp-block-heading">Lightspeed Venture Partners</h3>



<div class="wp-block-media-text is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="471" src="https://blog.gravyware.com/wp-content/uploads/2023/01/lightspeedScreenShot.png" alt="Lightspeed Venture Partners" class="wp-image-2934 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/lightspeedScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/lightspeedScreenShot-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/lightspeedScreenShot-768x452.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure><div class="wp-block-media-text__content">
<p><a href="https://lsvp.com" target="_blank" rel="noreferrer noopener nofollow">https://lsvp.com</a></p>



<p>Lightspeed Venture Partners is a venture capital firm with offices located in Menlo Park, Beijing, and Shanghai.</p>



<p>Founded in 2000, it invests in early and growth-stage startups across multiple sectors including consumer technology, financial technology industries, enterprise software, and healthcare technology.</p>



<p>Lightspeed’s most successful investments include BlueNile, Rubrik, The Honest Company, Snapchat, AppDynamics, and GrubHub.</p>
</div></div>



<p></p>



<h3 class="wp-block-heading">Menlo Ventures</h3>



<div class="wp-block-media-text has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><div class="wp-block-media-text__content">
<p><a href="http://www.menlovc.com" target="_blank" rel="noreferrer noopener nofollow">https://www.menlovc.com</a></p>



<p>Menlo Ventures is a venture capital firm headquartered in Silicon Valley.  The company has over $5 billion in assets under management.</p>



<p>Founded in 1976, it focuses on investments across sectors such as consumer technology, enterprise software, and healthcare startups.</p>



<p>The firm has made notable investments in companies such as Warby Parker, Roku, and 3Com.</p>
</div><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="471" src="https://blog.gravyware.com/wp-content/uploads/2023/01/menloVenturesScreenShot.png" alt="Menlo Ventures" class="wp-image-2933 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/menloVenturesScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/menloVenturesScreenShot-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/menloVenturesScreenShot-768x452.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure></div>



<p></p>



<h3 class="wp-block-heading">New Enterprise Associates</h3>



<div class="wp-block-media-text is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="471" src="https://blog.gravyware.com/wp-content/uploads/2023/01/neaScreenShot.png" alt="New Enterprise Associates (NEA)" class="wp-image-2932 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/neaScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/neaScreenShot-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/neaScreenShot-768x452.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure><div class="wp-block-media-text__content">
<p><a href="http://www.nea.com" target="_blank" rel="noreferrer noopener nofollow">https://www.nea.com</a></p>



<p>New Enterprise Associates (NEA) is a venture capital firm with offices located in Menlo Park, San Francisco, and Cambridge. They have approximately $25 billion in assets under management.</p>



<p>Founded in 1978, it focuses on investments across industries such as consumer products, enterprise software, and healthcare companies.</p>



<p>NEA’s successful investments include Box, MongoDB, IFTTT, Patreon, and Upwork.</p>
</div></div>



<p></p>



<h3 class="wp-block-heading">Sequoia Capital</h3>



<div class="wp-block-media-text has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><div class="wp-block-media-text__content">
<p><a href="https://www.sequoiacap.com" target="_blank" rel="noreferrer noopener nofollow">https://www.sequoiacap.com</a></p>



<p>Sequoia Capital is a venture capital firm that has offices located in Menlo Park, San Francisco, and Beijing. They have approximately a whopping $85 billion in assets under management.</p>



<p>Founded in 1972, it focuses on investments across sectors such as consumer products, enterprise software, and healthcare technology.</p>



<p>Some of Sequoia’s most successful investments include Apple, Cisco, Google, Instagram, Reddit, Paypal, LinkedIn, and Zoom.</p>
</div><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="471" src="https://blog.gravyware.com/wp-content/uploads/2023/01/sequoiaScreenShot.png" alt="Sequoia Capital" class="wp-image-2931 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/sequoiaScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/sequoiaScreenShot-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/sequoiaScreenShot-768x452.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure></div>



<p></p>



<h3 class="wp-block-heading">TCV</h3>



<div class="wp-block-media-text is-stacked-on-mobile is-vertically-aligned-top has-theme-palette-7-background-color has-background"><figure class="wp-block-media-text__media"><img loading="lazy" decoding="async" width="800" height="494" src="https://blog.gravyware.com/wp-content/uploads/2023/01/tcvScreenShot.png" alt="TCV Venture Capital" class="wp-image-2930 size-full" srcset="https://blog.gravyware.com/wp-content/uploads/2023/01/tcvScreenShot.png 800w, https://blog.gravyware.com/wp-content/uploads/2023/01/tcvScreenShot-300x185.png 300w, https://blog.gravyware.com/wp-content/uploads/2023/01/tcvScreenShot-768x474.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure><div class="wp-block-media-text__content">
<p><a href="https://www.tcv.com" target="_blank" rel="noreferrer noopener nofollow">https://www.tcv.com</a></p>



<p>TCV, formerly known as Technology Crossover Ventures, is a venture capital firm with offices located in Menlo Park and San Francisco. They have $25 billion in assets.</p>



<p>Founded in 1995, it focuses on investments across sectors such as consumer technology, enterprise software, and healthcare technology.</p>



<p>TCV’s most successful investments include Dollar Shave Club, Expedia, GoFundMe, Netflix, Spotify, and Zillow.</p>
</div></div>



<p></p>



<h2 class="wp-block-heading">Always Do Your Homework</h2>



<p>The best venture firms have a few things in common. They are led by experienced professionals, they invest in companies with large potential markets, and they focus on industries that are growing rapidly. If you&#8217;re looking for a firm to invest in your startup, keep these factors in mind.</p>



<p>Do some research on each firm and see which one would be the best fit for your company. You should also meet with different partners at each firm to get a better idea of who they are and what they can do for your business.</p>



<p>As always, please comment below if you have anything to add to this article.  Good luck!</p>



<p></p>



<p></p>



<p></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>HiLiter &#8211; Highlight Your Brand &#038; URL On Every Website</title>
		<link>https://blog.gravyware.com/hiliter-highlighter-chrome-extension</link>
		
		<dc:creator><![CDATA[David Garthe]]></dc:creator>
		<pubDate>Thu, 22 Dec 2022 18:51:36 +0000</pubDate>
				<category><![CDATA[Products]]></category>
		<category><![CDATA[Communication]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Technology]]></category>
		<guid isPermaLink="false">https://blog.gravyware.com/?p=2673</guid>

					<description><![CDATA[Hiliter is the perfect Chrome extension for highlighting your brand and website on every webpage. You'll never have to search for your links or keywords again!]]></description>
										<content:encoded><![CDATA[
<p>We released a quick Chrome browser extension that we built for internal use, but perhaps it will assist you also.</p>



<p><strong>It&#8217;s free</strong>, so please try it out and let us know if it helps you as well.</p>



<p class="has-medium-font-size"><a href="https://hiliter.co" target="_blank" rel="noreferrer noopener">https://hiliter.co</a></p>



<h2 class="wp-block-heading">The Problem We Needed to Fix</h2>



<p>We were always coming across mentions of our products in articles that we knew nothing about.  It got us wondering how many other mentions we were missing and knew nothing about.  We were spending a lot of time reading through articles and social media and forums because we didn&#8217;t want to &#8220;miss&#8221; someone commenting about our products.</p>



<p>We also wanted an easier way to track our product mentions in news sites and forums. We spend so much time sifting through posts that we needed a better way.  We were probably missing someone writing about our business or bypassing links that someone has pointed to you.</p>



<p>Scrolling through endless social media posts is exhausting and impossible to digest everything.&nbsp; I just want to find the posts that mention my product and company name.&nbsp; This results in a lot of wasted time, which is why we developed Hiliter Chrome extension. This chrome extension will immediately highlight your keywords and links whenever they exist on any website you visit.</p>



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



<p>With HiLiter Chrome extension, you&#8217;ll be able to save time by never having to search for your links or keywords again. You&#8217;ll be able to scroll quickly and only stop on those areas that contain your keywords and links.</p>


<div class="kb-gallery-wrap-id-_c73444-85 alignnone wp-block-kadence-advancedgallery"><div class="kb-gallery-ul kb-gallery-non-static kb-gallery-type-thumbslider kb-gallery-id-_c73444-85 kb-gallery-caption-style-bottom-hover kb-gallery-filter-none" data-image-filter="none" data-lightbox-caption="true"><div class="kt-blocks-carousel kt-carousel-container-dotstyle-dark"><div id="kb-slider-_c73444-85" class="kt-blocks-carousel-init splide kb-blocks-slider kt-carousel-arrowstyle-whiteondark kt-carousel-dotstyle-dark kb-slider-group-arrow kb-slider-arrow-position-center" data-columns-xxl="4" data-columns-xl="4" data-columns-md="4" data-columns-sm="4" data-columns-xs="4" data-columns-ss="4" data-slider-anim-speed="400" data-slider-scroll="1" data-slider-arrows="true" data-slider-fade="true" data-slider-dots="false" data-slider-hover-pause="false" data-slider-type="thumbnail" data-slider-nav="kb-thumb-slider-_c73444-85"  data-slider-auto="" data-slider-speed="7000" data-slider-gap="10px" data-slider-gap-tablet="10px" data-slider-gap-mobile="10px" data-show-pause-button="false"><div class="splide__track"><ul class="splide__list"><li class="kb-slide-item kb-gallery-carousel-item splide__slide"><div class="kadence-blocks-gallery-item"><div class="kadence-blocks-gallery-item-inner"><figure class="kb-gallery-figure kadence-blocks-gallery-item-hide-caption"><div class="kb-gal-image-radius"><div class="kb-gallery-image-contain kadence-blocks-gallery-intrinsic kb-gallery-image-ratio-land32 kb-has-image-ratio-land32" ><img loading="lazy" decoding="async" src="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-15.png" width="1280" height="800" alt="Hiliter Chrome extension screenshot" data-full-image="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-15.png" data-light-image="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-15.png" data-id="2676" class="wp-image-2676 skip-lazy" srcset="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-15.png 1280w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-15-300x188.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-15-1024x640.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-15-768x480.png 768w" sizes="auto, (max-width: 1280px) 100vw, 1280px" /></div></div></figure></div></div></li><li class="kb-slide-item kb-gallery-carousel-item splide__slide"><div class="kadence-blocks-gallery-item"><div class="kadence-blocks-gallery-item-inner"><figure class="kb-gallery-figure kadence-blocks-gallery-item-hide-caption"><div class="kb-gal-image-radius"><div class="kb-gallery-image-contain kadence-blocks-gallery-intrinsic kb-gallery-image-ratio-land32 kb-has-image-ratio-land32" ><img loading="lazy" decoding="async" src="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-13.png" width="1280" height="800" alt="Hiliter Chrome extension screenshot" data-full-image="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-13.png" data-light-image="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-13.png" data-id="2679" class="wp-image-2679 skip-lazy" srcset="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-13.png 1280w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-13-300x188.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-13-1024x640.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-13-768x480.png 768w" sizes="auto, (max-width: 1280px) 100vw, 1280px" /></div></div></figure></div></div></li><li class="kb-slide-item kb-gallery-carousel-item splide__slide"><div class="kadence-blocks-gallery-item"><div class="kadence-blocks-gallery-item-inner"><figure class="kb-gallery-figure kadence-blocks-gallery-item-hide-caption"><div class="kb-gal-image-radius"><div class="kb-gallery-image-contain kadence-blocks-gallery-intrinsic kb-gallery-image-ratio-land32 kb-has-image-ratio-land32" ><img loading="lazy" decoding="async" src="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-14.png" width="1280" height="800" alt="Hiliter Chrome extension screenshot" data-full-image="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-14.png" data-light-image="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-14.png" data-id="2678" class="wp-image-2678 skip-lazy" srcset="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-14.png 1280w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-14-300x188.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-14-1024x640.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-14-768x480.png 768w" sizes="auto, (max-width: 1280px) 100vw, 1280px" /></div></div></figure></div></div></li><li class="kb-slide-item kb-gallery-carousel-item splide__slide"><div class="kadence-blocks-gallery-item"><div class="kadence-blocks-gallery-item-inner"><figure class="kb-gallery-figure kadence-blocks-gallery-item-hide-caption"><div class="kb-gal-image-radius"><div class="kb-gallery-image-contain kadence-blocks-gallery-intrinsic kb-gallery-image-ratio-land32 kb-has-image-ratio-land32" ><img loading="lazy" decoding="async" src="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-16.png" width="1280" height="800" alt="Hiliter Chrome extension screenshot" data-full-image="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-16.png" data-light-image="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-16.png" data-id="2677" class="wp-image-2677 skip-lazy" srcset="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-16.png 1280w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-16-300x188.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-16-1024x640.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-16-768x480.png 768w" sizes="auto, (max-width: 1280px) 100vw, 1280px" /></div></div></figure></div></div></li></ul></div></div><div id="kb-thumb-slider-_c73444-85" class="kb-blocks-slider splide kt-carousel-arrowstyle-whiteondark kt-carousel-dotstyle-dark" data-slider-anim-speed="400" data-slider-scroll="1" data-slider-arrows="true" data-slider-fade="true" data-slider-dots="false" data-slider-hover-pause="false" data-slider-speed="7000" data-slider-type="thumbnail" data-slider-nav="kb-slider-_c73444-85"><div class="splide__track"><ul class="splide__list"><li class="kb-slide-item kb-gallery-carousel-item splide__slide"><div class="kadence-blocks-gallery-thumb-item"><div class="kadence-blocks-gallery-thumb-item-inner"><figure class="kb-gallery-figure"><div class="kb-gal-image-radius"><div class="kb-gallery-image-contain kadence-blocks-gallery-intrinsic kb-gallery-image-ratio-land32 kb-has-image-ratio-land32" ><img loading="lazy" decoding="async" src="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-15.png" width="1280" height="800" alt="Hiliter Chrome extension screenshot" data-full-image="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-15.png" data-light-image="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-15.png" data-id="2676" class="wp-image-2676 skip-lazy" srcset="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-15.png 1280w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-15-300x188.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-15-1024x640.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-15-768x480.png 768w" sizes="auto, (max-width: 1280px) 100vw, 1280px" /></div></div></figure></div></div></li><li class="kb-slide-item kb-gallery-carousel-item splide__slide"><div class="kadence-blocks-gallery-thumb-item"><div class="kadence-blocks-gallery-thumb-item-inner"><figure class="kb-gallery-figure"><div class="kb-gal-image-radius"><div class="kb-gallery-image-contain kadence-blocks-gallery-intrinsic kb-gallery-image-ratio-land32 kb-has-image-ratio-land32" ><img loading="lazy" decoding="async" src="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-13.png" width="1280" height="800" alt="Hiliter Chrome extension screenshot" data-full-image="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-13.png" data-light-image="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-13.png" data-id="2679" class="wp-image-2679 skip-lazy" srcset="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-13.png 1280w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-13-300x188.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-13-1024x640.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-13-768x480.png 768w" sizes="auto, (max-width: 1280px) 100vw, 1280px" /></div></div></figure></div></div></li><li class="kb-slide-item kb-gallery-carousel-item splide__slide"><div class="kadence-blocks-gallery-thumb-item"><div class="kadence-blocks-gallery-thumb-item-inner"><figure class="kb-gallery-figure"><div class="kb-gal-image-radius"><div class="kb-gallery-image-contain kadence-blocks-gallery-intrinsic kb-gallery-image-ratio-land32 kb-has-image-ratio-land32" ><img loading="lazy" decoding="async" src="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-14.png" width="1280" height="800" alt="Hiliter Chrome extension screenshot" data-full-image="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-14.png" data-light-image="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-14.png" data-id="2678" class="wp-image-2678 skip-lazy" srcset="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-14.png 1280w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-14-300x188.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-14-1024x640.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-14-768x480.png 768w" sizes="auto, (max-width: 1280px) 100vw, 1280px" /></div></div></figure></div></div></li><li class="kb-slide-item kb-gallery-carousel-item splide__slide"><div class="kadence-blocks-gallery-thumb-item"><div class="kadence-blocks-gallery-thumb-item-inner"><figure class="kb-gallery-figure"><div class="kb-gal-image-radius"><div class="kb-gallery-image-contain kadence-blocks-gallery-intrinsic kb-gallery-image-ratio-land32 kb-has-image-ratio-land32" ><img loading="lazy" decoding="async" src="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-16.png" width="1280" height="800" alt="Hiliter Chrome extension screenshot" data-full-image="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-16.png" data-light-image="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-16.png" data-id="2677" class="wp-image-2677 skip-lazy" srcset="https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-16.png 1280w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-16-300x188.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-16-1024x640.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/12/screenshot-rocks-16-768x480.png 768w" sizes="auto, (max-width: 1280px) 100vw, 1280px" /></div></div></figure></div></div></li></ul></div></div></div></div></div>


<h3 class="wp-block-heading">Potential Users</h3>



<ul class="wp-block-list">
<li><strong>Marketing Agencies</strong> &#8211; It&#8217;s an easy way for you to keep tabs on customer mentions in articles/forums</li>



<li><strong>PR Firms</strong></li>



<li><strong>OEMs</strong></li>



<li><strong>Brand Managers</strong></li>



<li><strong>SEO Specialists</strong>
<ul class="wp-block-list">
<li>Where are you mentioned?&nbsp; Where are your links on a page?&nbsp; Are they NOFOLLOW links?</li>
</ul>
</li>



<li><a href="https://blog.gravyware.com/best-venture-capital-firms" target="_blank" rel="noreferrer noopener">Venture Capital Firms</a>
<ul class="wp-block-list">
<li>Keep track of your investment mentions.</li>
</ul>
</li>
</ul>



<p><strong>It&#8217;s free</strong>, so please try it out and let us know if you find it useful.</p>



<p class="has-large-font-size"><a href="https://hiliter.co" target="_blank" rel="noreferrer noopener">https://hiLiter.co</a></p>



<p>Thanks!</p>



<p></p>



<h2 class="wp-block-heading">You Might Also Like</h2>



<ul class="wp-block-list">
<li><a href="https://blog.gravyware.com/the-best-startup-blogs-to-grow-your-business" data-type="post" data-id="2246">Follow These 48 best startup blogs to quickly grow your SaaS Business</a></li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>The Pros and Cons of Hiring Startup Funding Consultants</title>
		<link>https://blog.gravyware.com/pros-cons-of-hiring-startup-funding-consultants</link>
		
		<dc:creator><![CDATA[David Garthe]]></dc:creator>
		<pubDate>Fri, 21 Oct 2022 20:18:53 +0000</pubDate>
				<category><![CDATA[Finance]]></category>
		<guid isPermaLink="false">https://blog.gravyware.com/?p=2432</guid>

					<description><![CDATA[Many founders turn to funding consultants to help them navigate the often-complex world of VCs and angel investors. But is hiring a consultant the right move for your business? Let's take a look at the pros and cons so you can make an informed decision.]]></description>
										<content:encoded><![CDATA[
<p>So you&#8217;ve already checked out the <a href="https://blog.gravyware.com/the-best-startup-blogs-to-grow-your-business" target="_blank" rel="noreferrer noopener">recommended startup blogs</a> to read and now you&#8217;re ready to raise some money for your new venture.</p>



<p>Are you thinking about hiring a funding consultant? Not sure where to start? Here are some tips on how to find funding consultants that can help your business or organization get the funding it needs.</p>



<p>A funding consultant can be a valuable asset to your company, providing expertise and guidance when it comes to securing funding with <a href="https://blog.gravyware.com/top-venture-capital-firms" target="_blank" data-type="post" data-id="1110" rel="noreferrer noopener">venture capital firms</a> and other investment sources. However, it&#8217;s important to choose the right consultant for your needs and to manage expectations from the outset.</p>



<p>But is hiring a consultant the right move for your business? Let&#8217;s take a look at the pros and cons so you can make an informed decision.</p>



<h2 class="wp-block-heading">Who are startup Fundraising Consultants?</h2>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1014" height="643" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-82.png" alt="who are they" class="wp-image-2463" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-82.png 1014w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-82-300x190.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-82-768x487.png 768w" sizes="auto, (max-width: 1014px) 100vw, 1014px" /></figure>



<p>A startup funding consultant is a professional or business that helps organizations raise money. There are many different types of fundraising consultants, each with their own area of expertise. Some focus on grant writing, while others may specialize in capital campaigns or major gifts. There are also consultants who focus on specific sectors, such as healthcare or education. The role of a fundraising consultant is to provide advice and support to an organization&#8217;s staff and Board of Directors. They will often conduct research, create marketing materials, and provide training on how to effectively solicit investments.</p>



<p>Fundraising consultants can be hired on a retainer basis or by the project.</p>



<h2 class="wp-block-heading">Should I hire a startup Fundraising Consultant?</h2>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="982" height="462" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-81.png" alt="Should I hire a startup Fundraising Consultant?" class="wp-image-2462" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-81.png 982w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-81-300x141.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-81-768x361.png 768w" sizes="auto, (max-width: 982px) 100vw, 982px" /></figure>



<p>Fundraising is a complex and time-consuming process. It&#8217;s a specialty, and only you will know if you need an expert to assist you. Start by asking yourself some of the questions below to see if you need outside help.</p>



<ol class="wp-block-list">
<li>What is your experience with fundraising?</li>



<li>What is your success rate with raising funds for a startup business?</li>



<li>How much time do you have to dedicate to fundraising?</li>



<li>What is your budget for hiring a startup funding consultant?</li>



<li>What are your fundraising goals?</li>



<li>How soon do you need the funds raised?</li>



<li>Do you have any connections to <a href="https://blog.gravyware.com/top-venture-capital-firms" target="_blank" data-type="post" data-id="1110" rel="noreferrer noopener">venture capitalists</a> or other investors?</li>



<li>What is your strategy for marketing the startup to potential investors?</li>



<li>Do you have a pitch deck and business plans already created to show to investors?</li>
</ol>



<p><strong>Fun fact</strong> &#8211; The venture capital firm Andreessen Horowitz receives approximately 3000 requests for investment capital each year. They will look at approximately 200 seriously and invest in 20 of those. Each year. That is a<strong> .7%</strong> success rate.</p>



<p>So for every two hundred founders trying to raise money from potential investors, one will be successful. Read that again.</p>



<h2 class="wp-block-heading">What is the benefit of hiring a funding consultant?</h2>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="686" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-83-1024x686.png" alt="What is the benefit of hiring a funding consultant?" class="wp-image-2464" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-83-1024x686.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-83-300x201.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-83-768x514.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-83.png 1090w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Fundraising consultants can be referred to primarily as corporate finance advisors, fundraising brokers, or placement agents.</p>



<p>First, a good consultant will have an extensive network of VCs and angel investors that they can tap into on your behalf. This can save you a lot of time and energy that you would otherwise have to spend on outreach.</p>



<p>Second, a startup fundraising consultant can help you hone your pitch deck so that it&#8217;s as strong as possible before you start meeting with potential investors. Having a polished, professional pitch is essential if you want to stand out from the crowd and increase your chances of getting funded.</p>



<p>Lastly, a funding consultant can provide valuable feedback and guidance throughout the entire process, from crafting your pitch to negotiating terms with investors. This can be especially helpful if you&#8217;re new to the fundraising game.</p>



<p>Competent fundraisers may provide a variety of help, including</p>



<ul class="wp-block-list">
<li>Strategy development &#8211; how best to approach VCs to raise venture capital</li>



<li>Feasibility studies &#8211; using their experience to determine what is possible</li>



<li>Ongoing guidance and support</li>



<li>Training existing staff for future funding needs</li>



<li>Lead or augment a funding team for ongoing needs</li>



<li>and more</li>
</ul>



<h2 class="wp-block-heading">How can startup fundraising consultants help?</h2>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="998" height="570" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-84.png" alt="how can fundraising consultants help" class="wp-image-2465" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-84.png 998w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-84-300x171.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-84-768x439.png 768w" sizes="auto, (max-width: 998px) 100vw, 998px" /></figure>



<p>The Startup Funding Consultant is a business that has the skills, knowledge, and networks to support your startup. Various types of fundraisers provide expertise such as:</p>



<h3 class="wp-block-heading"><strong>1) Impartial Observer</strong></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="614" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-91-1024x614.png" alt="Impartial perspective" class="wp-image-2472" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-91-1024x614.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-91-300x180.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-91-768x460.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-91.png 1236w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>You created your company and are extremely close to every part of it.  That&#8217;s great for showing leadership, but bad for relating to someone else&#8217;s view.</p>



<p>Investors are going to look at things that may seem inconsequential to you, but are deal breakers for them.  This is where an experienced consultant provides value.  They can help you prepare for what VCs want, and make your company look like a great investment to them.  You want someone who can provide an unbiased and independent perspective on the subject. They&#8217;ll evaluate your business model like any investor and help you prepare to answer questions.</p>



<h3 class="wp-block-heading"><strong>2) competitive analysis</strong> Matrix</h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="682" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-90-1024x682.png" alt="Market analysis and competitive analysis" class="wp-image-2471" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-90-1024x682.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-90-300x200.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-90-768x512.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-90.png 1114w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>To win many battles, you need detailed competitor information to dissect and plan against. Fund-raising experts provide you with competitive analysis and market research based on current trend information.</p>



<p>Reviewing the products/services provided by your competitors can help you establish yourself as an individual and differentiate your idea in the wider marketplace.</p>



<p>Before your first meeting with a venture capital firm, this market research knowledge will greatly improve your fundraising strategy.</p>



<h3 class="wp-block-heading"><strong>3) Their experience Is Critical</strong></h3>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="881" height="590" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-80.png" alt="Their experience always comes in handy" class="wp-image-2461" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-80.png 881w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-80-300x201.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-80-768x514.png 768w" sizes="auto, (max-width: 881px) 100vw, 881px" /></figure>



<p>Many startup fundraising consultants are individuals that had a career in venture capital as a Venture Capitalist. They, therefore, have a good knowledge of how investments are made and what aspects of their marketing pitch are usually screened carefully. In contrast, these consultants might be former founders who have built and managed thriving businesses and have experience in dealing with investors such as raising funds for an initial start-up. These former founders usually have extensive knowledge of the methods for running successful fundraising campaigns.</p>



<h3 class="wp-block-heading"><strong>4) Networking / Access to their network</strong></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="677" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-85-1024x677.png" alt="Access to networks" class="wp-image-2466" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-85-1024x677.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-85-300x198.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-85-768x508.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-85.png 1119w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Consultants have always occupied a key position within the complex network of investment firms that support growing companies and tech startups in raising capital. With the right consultant, you&#8217;ll have access to a valuable network that can help you find the ideal investors for your business. This network consists of highly experienced professionals and academic experts who can assist you with information about optimizing the business model, presenting your best pitches, and generating the best results.</p>



<h3 class="wp-block-heading"><strong>5) Validation of ideas</strong></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="683" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-89-1024x683.png" alt="validation of ideas" class="wp-image-2470" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-89-1024x683.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-89-300x200.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-89-768x512.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-89.png 1118w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Ideally, before pitching to investors, it must be an interesting idea and is likely profitable for the investors. You should consider multiple aspects when evaluating an investment opportunity that is feasible.</p>



<p>If this is your first venture you will likely be too attached to the project and will defend it in the most efficient manner. It is important to remember that investors will not be looking at it in the same manner.</p>



<p>A good fundraising consultant will have an extensive network of founders that they&#8217;ve worked with in the past. They can tap into these experts when conducting market research for your product to see how your product will be received.</p>



<h3 class="wp-block-heading"><strong>6) Validation of business plan</strong></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="681" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-88-1024x681.png" alt="validation of business plan" class="wp-image-2469" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-88-1024x681.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-88-300x200.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-88-768x511.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-88.png 1118w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>For gaining investor confidence, a business plan must contain a viable business plan. A business plan can provide clarity on your vision and help prospective investors verify your business and financial statements. It gives you credibility as an entrepreneur.</p>



<p>The best business plan is formulated by researching every aspect of business operations. New entrepreneurs often need assistance developing an adequate business plan and marketing strategy. Since fundraising experts are typically former VCs or have extensive experience in running startups, they are available to help you with advice based on their experience over a long period of time.</p>



<h3 class="wp-block-heading"><strong>8) Pitch Deck Creation / Analysis</strong></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="609" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-87-1024x609.png" alt="pitch deck analysis" class="wp-image-2468" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-87-1024x609.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-87-300x178.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-87-768x456.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-87.png 1119w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>How do startups get investors interested in their products? Many entrepreneurs are analyzing some important characteristics of the startup to determine its potential value. A fundraising consultant helps make the most strategic presentations possible. The fundraising consulting firm can also assist you to design your pitches that cover all financial and investment requirements as well as projections of the projected expansion of the investment.</p>



<h2 class="wp-block-heading">What to look out for</h2>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="572" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-92-1024x572.png" alt="what to look out for" class="wp-image-2474" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-92-1024x572.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-92-300x167.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-92-768x429.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-92.png 1383w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Of course, there are also some potential downsides to hiring a funding consultant. The first is that it can be expensive—good consultants don&#8217;t come cheap. You&#8217;ll need to make sure you have the budget to cover their fees before signing on the dotted line.</p>



<p>Another potential downside is that some consultants may not have your best interests at heart. There have been cases where consultants have taken advantage of unsuspecting founders by promising results they can&#8217;t deliver or charging exorbitant fees for their services. This is why it&#8217;s important to do your due diligence when choosing a consultant and only work with someone you trust.</p>



<p>It may be a daunting task to find a reputable fundraiser consultant since there is an industry in the Startup sector willing to take money from startups who are desperate for help but without guarantees. Just do your due diligence and keep reading.</p>



<h3 class="wp-block-heading"><strong>1) It can be difficult to accurately gauge Their Network strength</strong></h3>



<p>Everyone should remember that a fundraising consultant is a professional who constantly seeks out job opportunities. Therefore, they may overestimate certain aspects of their resume, particularly their networking ability, in order to get more clients from startup firms.</p>



<p>Also, a consulting firm may have an extensive network of investors they have previously dealt with but their relationship status may be far less than what you are told. You can waste money by hiring someone who may not possess the skills or expertise necessary to get the results you want.</p>



<h3 class="wp-block-heading"><strong>2) They Bring Their Own Baggage</strong></h3>



<p>Startup funding consultants are typically experts who have long worked with their businesses in this field, and they will possess a wide array of expertise and insights. While it can prove beneficial (and maybe a good thing) for most founders it can also present problems. The problem is that a consultant may instinctively block some of your ideas (due to past success/failure history with a similar idea) which may ultimately lead to an insufficient investment amount for your product.</p>



<h3 class="wp-block-heading"><strong>3) Be aware – Investors expect the CEO to be the fundraiser</strong></h3>



<p>Investors expect CEO conversations at a fundraising event if they aren&#8217;t sure about it. Investors expect the head executive to be the main cheerleader for the company. They&#8217;re investing in the company and the people together. A great funding consultant will work closely with the CEO to ensure that all investor expectations are met. The consultant augments the CEO&#8217;s role in fundraising, he does not replace it.</p>



<h3 class="wp-block-heading"><strong>4) The final agreement may not be in your best interest</strong></h3>



<p>When working with a funding consultant, it&#8217;s important to remember that they are ultimately looking out for their own interests. This means that the final agreement you reach with them may not be in your best interests. Make sure you read over any agreement carefully before signing it and don&#8217;t be afraid to negotiate for better terms.</p>



<h3 class="wp-block-heading"><strong>5) There is no guarantee of success in raising funds</strong></h3>



<p>One of the most important things to remember when working with a funding consultant is that there is no guarantee of success in raising capital. Just because you&#8217;re paying someone to help you raise money doesn&#8217;t mean they will be successful in doing so. There are a lot of factors that go into successfully raising money, and even the best consultants can&#8217;t control all of them.</p>



<h2 class="wp-block-heading"><strong>Where To Find Funding Consultants</strong></h2>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="713" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-93-1024x713.png" alt="where to find startup funding consultants" class="wp-image-2475" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-93-1024x713.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-93-300x209.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-93-768x534.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-93.png 1026w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Ask your network! Does anyone already know someone that they&#8217;d recommend? Perhaps other founders have worked with someone.</p>



<p>If you seek to raise money for nonprofit organizations, you&#8217;ll want a specialized &#8220;nonprofit fundraising consultant&#8221;.  Basically, someone that has specific experience in that field.</p>



<p>If you&#8217;re comfortable with it, browse the news and see who has raised capital recently. Reach out to them and to if they would recommend someone. You want an experienced and successful fundraising consulting expert, so this would check both of those boxes.</p>



<p>We also recommend reaching out to some of the profiles at <a href="https://blog.gravyware.com/recommends/toptal-generic" target="_blank" rel="noreferrer noopener nofollow">TopTal</a>. They have dedicated <a href="https://blog.gravyware.com/recommends/toptal-funding-startup-help" target="_blank" rel="noreferrer noopener nofollow">Startup Funding Consultants</a> ready for you.</p>



<h2 class="wp-block-heading">How much should you expect to pay?</h2>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="580" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-94-1024x580.png" alt="How much should you expect to pay?" class="wp-image-2478" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-94-1024x580.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-94-300x170.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-94-768x435.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-94.png 1117w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>You can expect to pay a monthly retainer plus a fee that is based primarily on the total amount of money raised. This fee structure ensures that your consultant is incentivized to help you raise as much money as possible.</p>



<p>One method might be to increase the fee they receive once they hit pre-arranged benchmarks. An example of this would be 1% for the first million, 2% for the second million, and so on. Another example would be to increase the fees only if XX amount is raised by XX date.</p>



<p>While the exact amount you will pay your consultant will depend on the specific arrangement you have with them, you should generally expect to pay several thousand dollars per month at a minimum. In many cases, you may be responsible for covering the cost of travel and other expenses related to their work on your behalf.</p>



<p>Despite the high cost of hiring a fundraising consultant, many organizations find that it is well worth the investment. A good fundraising consultant can provide invaluable assistance in developing and implementing a successful fundraising strategy.</p>



<p>When done correctly, hiring a consultant can help you raise the money you need to achieve your goals and make your organization thrive. It may cost you a bit of money upfront, but it could end up being one of the best decisions you ever make for your organization.</p>



<h2 class="wp-block-heading">How to Maximize Success With a Funding Consultant</h2>



<h3 class="wp-block-heading">Do Your Research</h3>



<p>It&#8217;s important to do your research and choose someone who has a proven track record in securing funding for companies like yours. Ask for referrals from trusted sources, read online reviews, and check out the consultant&#8217;s website and social media profiles to get a sense of their experience and approach.</p>



<h3 class="wp-block-heading">Set Clear Goals</h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="666" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-95-1024x666.png" alt="Set clear goals" class="wp-image-2479" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-95-1024x666.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-95-300x195.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-95-768x500.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-95.png 1116w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>It&#8217;s important to have a clear understanding of your goals before you even meet with anyone. What kind of funding are you looking for? How much money do you need to raise? What is your timeline for securing funding? By setting clear goals upfront, you&#8217;ll be able to better assess whether or not a particular consultant is a good fit for your needs.</p>



<h3 class="wp-block-heading">Manage Expectations</h3>



<p>While they will be able to provide valuable insights and guidance, they cannot guarantee that you will secure funding. Be realistic about what a consultant can and cannot do for you, and don&#8217;t hesitate to ask questions if you&#8217;re unsure about anything.</p>



<h2 class="wp-block-heading">How to get unstuck with a startup mentor</h2>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="604" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-96-1024x604.png" alt="How to get unstuck with a startup mentor" class="wp-image-2480" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-96-1024x604.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-96-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-96-768x453.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-96.png 1098w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Let&#8217;s say you&#8217;re not quite sure you want a funding consult and you feel stuck. You&#8217;re not sure how to get unstuck, but you know you need help. A mentor could be the answer to your problem. But how do you find a mentor? And once you find one, how do you make the most of your relationship?</p>



<p>There are a few things to keep in mind when looking for a mentor. First, it&#8217;s important to find someone who is knowledgeable about the industry in which your startup operates. This ensures that they can provide valuable insights and advice. Second, look for someone who has experience starting and running a successful business. You can learn from their mistakes and successes. Finally, choose someone who you respect and who you feel comfortable talking to. A good mentor relationship is built on trust and mutual respect.</p>



<p>Once you&#8217;ve found a mentor, it&#8217;s important to make the most of your relationship. First, be prepared when you meet with your mentor. Come to each meeting with specific questions or topics that you want to discuss. This shows that you&#8217;re serious about learning from your mentor. Second, be open to feedback. A good mentor will give honest feedback, even if it&#8217;s not what you want to hear. It&#8217;s important to listen with an open mind and take their advice to heart. Finally, don&#8217;t forget to show your appreciation. A simple &#8220;thank you&#8221; goes a long way in maintaining a strong mentor relationship.</p>



<h3 class="wp-block-heading"><strong>Where can I find a mentor?</strong></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="604" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-97-1024x604.png" alt="Where can I find a mentor?" class="wp-image-2481" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-97-1024x604.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-97-300x177.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-97-768x453.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-97.png 1311w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Startup incubators often provide a mentorship program, but we&#8217;re assuming you&#8217;re not already in that scenario already.</p>



<p>Similar to finding a startup funding consultant, try asking other people who they would recommend. Perhaps you know someone already and you could either ask them to be your mentor (assuming they check all the boxes above) or ask your network if they would recommend someone. We always lend more weight to the person who has been recommended.</p>



<p>You can also check out the sites below to try to find someone you like.</p>



<ul class="wp-block-list">
<li><a href="https://www.startupbootcamp.org/mentors/" target="_blank" rel="noreferrer noopener nofollow">https://www.startupbootcamp.org/mentors/</a></li>



<li><a href="https://www.growthmentor.com/startup-funding-consultants/" target="_blank" rel="noreferrer noopener nofollow">https://www.growthmentor.com/startup-funding-consultants/</a></li>



<li><a href="https://mentorcruise.com/filter/startup/" target="_blank" rel="noreferrer noopener nofollow">https://mentorcruise.com/filter/startup/</a></li>



<li><a href="https://www.scaling.partners/startup-fundraising-consultant/" target="_blank" rel="noreferrer noopener nofollow">https://www.scaling.partners/startup-fundraising-consultant/</a></li>
</ul>



<p>Don&#8217;t be afraid to try multiple people until you find the right fit. It&#8217;s like dating, it&#8217;s not always easy to determine which ones are crazy until you&#8217;ve spoken a few times.</p>



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



<p>Startups can hire reputable fundraising consultants if hired at the right time to boost revenue and increase sales. Hiring an experienced startup consultant can cause more problems than solutions though. You can use a similar form of money to obtain an investment from friends or family. After completing an early stage in running the business you can hire a consultant to scale your company.</p>



<p>Hiring a funding consultant can be a great way to give your fundraising efforts a boost—but it&#8217;s not right for everyone. Before making a decision, weigh the pros and cons carefully to see if bringing on a consultant makes sense for your business.</p>



<p>A funding consultant can be a valuable asset when it comes to securing funding for your business. However, it&#8217;s important to choose the right consultant for your needs and manage expectations from the outset. By following these tips, you&#8217;ll be in a good position to get the most out of your funding consultant relationship.</p>



<div class="wp-block-kadence-column kadence-column_e6036c-58 inner-column-1"><div class="kt-inside-inner-col">
<div class="wp-block-kadence-column kadence-column_08a9b5-2b kb-section-dir-horizontal inner-column-1"><div class="kt-inside-inner-col">
<div class="wp-block-kadence-icon kt-svg-icons kt-svg-icons_484c34-cc alignnone kb-icon-valign-middle">
<div class="kt-svg-style-default kt-svg-icon-wrap kt-svg-item-_4353d7-29"><span class="kb-svg-icon-wrap kb-svg-icon-fe_info"><svg viewBox="0 0 24 24"  fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"  aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12" y2="8"/></svg></span></div>
</div>



<span class="kt-adv-heading_d5ff3f-a3 wp-block-kadence-advancedheading" data-kb-block="kb-adv-heading_d5ff3f-a3">Disclosure</span>
</div></div>



<p>Some of the links in this article may be affiliate links, which can provide compensation to me at no cost to you if you decide to purchase the product.</p>
</div></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Follow These 48 best startup blogs to quickly grow your SaaS Business (2023)</title>
		<link>https://blog.gravyware.com/the-best-startup-blogs-to-grow-your-business</link>
		
		<dc:creator><![CDATA[David Garthe]]></dc:creator>
		<pubDate>Wed, 19 Oct 2022 19:14:35 +0000</pubDate>
				<category><![CDATA[Communication]]></category>
		<category><![CDATA[Finance]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[SaaS]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Technology]]></category>
		<guid isPermaLink="false">https://blog.gravyware.com/?p=2246</guid>

					<description><![CDATA[To help the new startup founder out, we've put together a list of some of the best startup blogs that you should be following if you're looking to grow your SaaS startup.   All are centered on helping tech companies succeed in the business world and their respective startup industry.]]></description>
										<content:encoded><![CDATA[
<p>We all know how important it is to stay up-to-date with the latest startup news and trends. But with so many tech startup blogs out there, it can be tough to know which ones are worth reading.</p>



<p>To help the new startup founder out, we&#8217;ve put together a list of some of the best startup blogs that you should be following if you&#8217;re looking to grow your SaaS startup.  Some are blogs of software and internet companies, but many are independent media sites.  All are centered on helping tech companies succeed in the business world and their respective startup industry.</p>



<p>If you&#8217;re looking for tech news about other tech startups, there is plenty to choose from as well. The list below is for expanding your knowledge and learning new techniques that will be useful for your business (and maybe a few tech news sites).  We&#8217;ve put them into categories, but they do seem to overlap in places.</p>



<p>Hopefully, they will save you some time in your entrepreneurial adventure. The need to maintain relevant information is critical – particularly given that the changing world has changed dramatically.</p>



<p>Let us know if we missed a blog that you think should be added.</p>





<h2 class="wp-block-heading" style="text-transform:uppercase"><strong>Digital Marketing</strong> Startup Blogs</h2>



<p>Digital marketing is the process of using digital channels to promote or market products and services to target customers. Channels include social media, email, search engines, websites, and mobile apps.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="384" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-25-1024x384.png" alt="digital marketing startup blogs" class="wp-image-2261" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-25-1024x384.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-25-300x112.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-25-768x288.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-25-1536x576.png 1536w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-25.png 1595w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>The startup marketing blogs we recommend are:</p>



<h3 class="wp-block-heading">1) <u><a href="https://www.marketingcharts.com/" target="_blank" rel="noreferrer noopener nofollow">Marketing Charts</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="555" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-32-1024x555.png" alt="marketingcharts.com screenshot" class="wp-image-2291" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-32-1024x555.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-32-300x163.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-32-768x416.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-32-1536x833.png 1536w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-32.png 1594w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>MarketingCharts is first and foremost a hub of marketing data, graphics, and analyses.  They are a leading data source cited by many of the top news agencies.  Did you know that <a href="https://www.marketingcharts.com/digital/social-media-227454" target="_blank" rel="noreferrer noopener nofollow">YouTube usage by adults is on the rise</a>?  I did because I read this site.</p>



<p>This is also a great resource if you need information for a blog post or presentation deck.  The site is updated multiple times per week.</p>



<h3 class="wp-block-heading">2) <a href="https://www.cmswire.com/" target="_blank" rel="noreferrer noopener nofollow"><u>CMSWire</u></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="826" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-33-1024x826.png" alt="CMSWire screenshot" class="wp-image-2293" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-33-1024x826.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-33-300x242.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-33-768x620.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-33.png 1294w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>They obsess over the evolving digital customer experience, customer data, and digital experience optimization universe.</p>



<p>This site is updated daily.</p>



<h3 class="wp-block-heading">3) <u><a href="https://contentmarketinginstitute.com/blog/" target="_blank" rel="noreferrer noopener nofollow">Content Marketing Institute</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="922" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-34-1024x922.png" alt="Content Marketing Institute screenshot" class="wp-image-2295" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-34-1024x922.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-34-300x270.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-34-768x691.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-34.png 1103w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>As the name suggests, CMI is all about content marketing. They provide helpful resources, tips, and advice on how to create and market engaging content that will attract and convert leads into customers.</p>



<p>The site is updated daily.</p>



<h3 class="wp-block-heading">4) <u><a href="https://econsultancy.com/articles/" target="_blank" rel="noreferrer noopener nofollow">Econsultancy</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="771" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-35-1024x771.png" alt="econsultancy screenshot" class="wp-image-2297" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-35-1024x771.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-35-300x226.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-35-768x578.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-35.png 1380w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>The latest articles on global digital marketing and e-commerce from Econsultancy’s award-winning analysts and experts.</p>



<p>This site is updated a few times per week.</p>



<h3 class="wp-block-heading">5) <a href="https://martech.org/" target="_blank" rel="noreferrer noopener nofollow"><u>MarTech</u></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="615" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-36-1024x615.png" alt="MarTech screenshot" class="wp-image-2299" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-36-1024x615.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-36-300x180.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-36-768x461.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-36.png 1493w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>MarTech is on a mission to educate marketers about marketing technology and strategy through news and feature reporting, newsletters, research reports, live conferences, and digital events.</p>



<p>This site is updated multiple times per day.</p>



<p></p>



<h2 class="wp-block-heading" style="text-transform:uppercase"><strong>Technology &amp; Tech News</strong> Startup Blogs</h2>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="471" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-26-1024x471.png" alt="technology and tech news blogs" class="wp-image-2263" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-26-1024x471.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-26-300x138.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-26-768x353.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-26.png 1297w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>We have to see what&#8217;s going on outside of our own business from time to time. Here are the sites we frequently read:</p>



<h3 class="wp-block-heading">1) <a href="https://hackernoon.com/" target="_blank" rel="noreferrer noopener nofollow"><u>HackerNoon</u></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="530" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-37-1024x530.png" alt="HackerNoon screenshot" class="wp-image-2301" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-37-1024x530.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-37-300x155.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-37-768x398.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-37-1536x796.png 1536w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-37.png 1892w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>How hackers start their afternoon. HackerNoon is a free platform with 25k+ contributing writers. 100M+ humans have visited HackerNoon to learn about technology.</p>



<p>HackerNoon is updated multiple times per day.</p>



<h3 class="wp-block-heading">2) <a href="https://www.forentrepreneurs.com/" target="_blank" rel="noreferrer noopener nofollow"><span style="text-decoration: underline;">ForEntrepreneurs</span></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="827" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-38-1024x827.png" alt="forEntrepreneurs screenshot" class="wp-image-2303" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-38-1024x827.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-38-300x242.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-38-768x620.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-38.png 1286w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Run by David Skok, a Venture Capitalist with Matrix Partners.  There is a wealth of great articles here that will give you every advantage you need to succeed.</p>



<p>The site is well laid-out and the articles are well written.</p>



<h3 class="wp-block-heading">3) <a href="https://techcrunch.com/" target="_blank" rel="noreferrer noopener"><span style="text-decoration: underline;">TechCrunch</span></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="674" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-39-1024x674.png" alt="TechCrunch screenshot" class="wp-image-2306" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-39-1024x674.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-39-300x198.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-39-768x506.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-39-1536x1012.png 1536w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-39.png 1564w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>TechCrunch has been around for a long time and remains one of the best sources for tech news. They report on the business of technology, startups, venture capital funding, and Silicon Valley in general.</p>



<p>Many updates are made throughout the day on this site.</p>



<h3 class="wp-block-heading">4) <a href="https://readwrite.com/" target="_blank" rel="noreferrer noopener nofollow"><u>ReadWrite</u></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="568" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-41-1024x568.png" alt="readwrite screenshot" class="wp-image-2309" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-41-1024x568.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-41-300x167.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-41-768x426.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-41-1536x853.png 1536w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-41.png 1870w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Self-described as &#8220;The Blog of Things&#8221;.  ReadWrite writes articles slanted toward the tech-savvy reader.</p>



<p>This site is updated daily.<br></p>



<h3 class="wp-block-heading">5) <a href="https://www.vox.com/recode" target="_blank" rel="noreferrer noopener nofollow"><u>Recode</u></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="923" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-42-1024x923.png" alt="recode screenshot" class="wp-image-2312" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-42-1024x923.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-42-300x270.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-42-768x692.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-42.png 1086w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>The tech column of Vox Media. Recode explores how the digital world is changing — from keeping Big Tech accountable to explaining how decisions in Silicon Valley affect your daily life.</p>



<p>Recode is updated daily.<br></p>



<h3 class="wp-block-heading">6) <a href="https://venturebeat.com/" target="_blank" rel="noreferrer noopener nofollow"><u>VentureBeat</u></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="668" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-43-1024x668.png" alt="" class="wp-image-2314" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-43-1024x668.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-43-300x196.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-43-768x501.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-43.png 1299w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>VentureBeat covers transformative tech. They help business leaders make smarter decisions.</p>



<p>This site is updated many times per day.<br></p>



<h3 class="wp-block-heading">7) <a href="https://gigaom.com/" target="_blank" rel="noreferrer noopener nofollow"><u>GigaOm</u></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="787" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-44-1024x787.png" alt="GigaOm screenshot" class="wp-image-2317" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-44-1024x787.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-44-300x231.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-44-768x590.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-44.png 1348w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>GigaOm provides research from engineering-led practitioners to help you innovate, upskill, and be ready for what’s next.</p>



<p>You will spend a lot of time wading through all the information on this site.<br></p>



<h3 class="wp-block-heading">8) <a href="https://arstechnica.com/" target="_blank" rel="noreferrer noopener nofollow"><span style="text-decoration: underline;">Ars Technica</span></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="766" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-45-1024x766.png" alt="Ars Technica screenshot" class="wp-image-2319" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-45-1024x766.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-45-300x225.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-45-768x575.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-45.png 1296w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Serving the Technologist for more than a decade. A combination of IT news, reviews, and analysis.  We love this site.</p>



<p>Ars Technica is updated many times per day.</p>



<p></p>



<h2 class="wp-block-heading" style="text-transform:uppercase"><strong>SEO</strong> Startup Blogs</h2>



<p>SEO (Search Engine Optimization) is the process of optimizing a website for Google search with the goal of earning higher web traffic levels and improving the visibility of the site. A strong SEO strategy can also help to improve conversion rates by making it easier for potential customers to find your website.</p>



<p>SEO strategies focus on improving both on-page and off-page ranking factors. On-page SEO tactics include optimizing title tags, meta descriptions, and header tags. Off-page SEO tactics include link-building and social media engagement.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="433" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-27-1024x433.png" alt="SEO Startup blogs" class="wp-image-2265" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-27-1024x433.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-27-300x127.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-27-768x324.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-27.png 1077w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Staying on top of Google&#8217;s constantly changing algorithm is critical. These blogs can help you with that.</p>



<h3 class="wp-block-heading">1) <a href="https://blog.gravyware.com/recommends/surfer-seo" target="_blank" rel="noreferrer noopener nofollow"><span style="text-decoration: underline;">Surfer SEO</span></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="697" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-78-1024x697.png" alt="Surfer SEO blog screenshot" class="wp-image-2436" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-78-1024x697.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-78-300x204.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-78-768x523.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-78.png 1516w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Surfer is our go-to tool for SEO purposes.  Their blog is solid information about on-page, content creation &amp; SEO tips.</p>



<p>They generally provide new tips a few times a month and it will often include instructions on how their tool can make things easier (which it does).</p>



<h3 class="wp-block-heading">2) <u><a href="https://moz.com/blog" target="_blank" rel="noreferrer noopener nofollow">The Moz</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="894" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-46-1024x894.png" alt="The Moz Blog screenshot" class="wp-image-2321" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-46-1024x894.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-46-300x262.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-46-768x671.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-46.png 1190w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>The industry&#8217;s top wizards, doctors, and other experts offer their best advice, research, how-tos, and insights—all in the name of helping you level up your SEO and online marketing skills.</p>



<p>This site is updated every few days.</p>



<h3 class="wp-block-heading">3) <u><a href="https://neilpatel.com/blog/" target="_blank" rel="noreferrer noopener nofollow">Neil Patel</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="832" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-47-1024x832.png" alt="Neil Patel screenshot" class="wp-image-2323" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-47-1024x832.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-47-300x244.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-47-768x624.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-47.png 1203w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Neil Patel is regarded as one of the most knowledgeable SEO experts out there.  He has great articles and can help analyze your website to identify SEO errors, keyword opportunities, and competition.</p>



<p>His site isn&#8217;t updated daily, but there are a lot of articles to go through.</p>



<h3 class="wp-block-heading">4) <u><a href="https://rankmath.com/blog/" target="_blank" rel="noreferrer noopener nofollow">RankMath Blog</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="871" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-48-1024x871.png" alt="RankMath blog screenshot" class="wp-image-2325" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-48-1024x871.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-48-300x255.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-48-768x654.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-48.png 1222w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>One of the best WordPress plugins for SEO brings you one of the best blogs as well. Their SEO blog provides you with tutorials and guides on how to improve SEO and take your rankings to the next level.  They have quite a few extensive tutorials.</p>



<p>This site is updated weekly or so.</p>



<h3 class="wp-block-heading">5) <a href="https://copyblogger.com/" target="_blank" rel="noreferrer noopener nofollow"><span style="text-decoration: underline;">CopyBlogger</span></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="858" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-49-1024x858.png" alt="CopyBlogger screenshot" class="wp-image-2327" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-49-1024x858.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-49-300x251.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-49-768x643.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-49.png 1231w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Their tagline is &#8220;We Help Writers Succeed in the Creator Economy&#8221;.  So few people can really write well which is why we frequent this blog.  The insights you get from these articles are empowering and enlightening.  Your SEO will benefit greatly from improved content, and this blog helps with that.</p>



<p>This site is updated a few times per week.</p>



<p></p>



<h3 class="wp-block-heading">6) <a href="https://copyblogger.com/" target="_blank" rel="noreferrer noopener nofollow"><span style="text-decoration: underline;">Ahrefs Blog</span></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="785" src="https://blog.gravyware.com/wp-content/uploads/2022/12/image-1024x785.png" alt="Ahrefs Blog Screenshot" class="wp-image-2624" srcset="https://blog.gravyware.com/wp-content/uploads/2022/12/image-1024x785.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/12/image-300x230.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/12/image-768x589.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/12/image.png 1203w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Ahrefs is a critical tool for SEO purposes.  Their entire business helps you rank higher in Google.  You&#8217;ll find a wealth of information here on how to rank higher and how their tool can help you save time.</p>



<p>They&#8217;ll typically use videos in order to help with their blog posts.</p>



<p>This site is updated a few times per week.</p>



<h2 class="wp-block-heading" style="text-transform:uppercase"><strong>Email / SMS Marketing</strong> Startup Blogs</h2>



<p>Email Marketing is one of the most effective ways to reach your target audience and build relationships with them. Email Marketing can also help you to increase brand awareness, drive traffic to your website, and generate leads.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="512" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-28-1024x512.png" alt="email marketing startup blogs" class="wp-image-2266" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-28-1024x512.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-28-300x150.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-28-768x384.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-28.png 1153w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">1) <u><a href="https://www.litmus.com/blog/" target="_blank" rel="noreferrer noopener nofollow">Litmus</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="702" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-50-1024x702.png" alt="Litmus blog screenshot" class="wp-image-2329" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-50-1024x702.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-50-300x206.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-50-768x526.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-50.png 1318w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Get email best practices, how-tos, and more in the Litmus blog.  There&#8217;s a lot of them here.</p>



<p>There are new articles and tutorials every few days.</p>



<h3 class="wp-block-heading">2) <u><a href="https://sendgrid.com/blog/" target="_blank" rel="noreferrer noopener nofollow">SendGrid</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="670" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-51-1024x670.png" alt="SendGrid blog screenshot" class="wp-image-2331" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-51-1024x670.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-51-300x196.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-51-768x502.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-51-1536x1004.png 1536w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-51.png 1589w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Read the SendGrid blog (The Full Send) to learn how to maximize your customer reach, and how to fully take advantage of the capabilities that SendGrid offers.</p>



<p>There are new articles every week or so.</p>



<h3 class="wp-block-heading">3) <u><a href="https://blog.emailoctopus.com/" target="_blank" rel="noreferrer noopener nofollow">Email Octopus</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="930" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-52-1024x930.png" alt="email octopus screenshot" class="wp-image-2333" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-52-1024x930.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-52-300x273.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-52-768x698.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-52.png 1127w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Email tips, inspiration, and insights from the team at EmailOctopus​. They want to make email marketing easier for you and have articles and case studies.</p>



<p>The blog updates have slowed down recently, and are now updated about once a month.</p>



<h3 class="wp-block-heading">4) <u><a href="https://blog.aweber.com/" target="_blank" rel="noreferrer noopener nofollow">AWeber</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="930" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-53-1024x930.png" alt="AWeber screenshot" class="wp-image-2335" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-53-1024x930.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-53-300x272.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-53-768x698.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-53.png 1145w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Find a wealth of valuable advice, tips, and tricks to grow your email list, increase sales, improve your emails, and landing pages, and so much more.</p>



<p>New articles are added and updated every couple of days.</p>



<h3 class="wp-block-heading">5) <u><a href="https://mailchimp.com/resources/email/" target="_blank" rel="noreferrer noopener nofollow">Mailchimp</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="669" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-54-1024x669.png" alt="mailchimp blog screenshot" class="wp-image-2338" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-54-1024x669.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-54-300x196.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-54-768x502.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-54.png 1446w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>From one of the biggest email software providers.  This is less of a blog and more of a knowledge base.  Get advice on creating and sending effective campaigns.</p>



<p>We&#8217;re not sure of the frequency that new articles are added, although the information seems updated.</p>



<h3 class="wp-block-heading">6) <u><a href="https://www.theemailmarketers.com/blog" target="_blank" rel="noreferrer noopener nofollow">The Email Marketers</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="849" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-55-1024x849.png" alt="The Email Marketers screenshot" class="wp-image-2340" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-55-1024x849.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-55-300x249.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-55-768x637.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-55.png 1241w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Get the latest email marketing strategies and techniques in e-commerce to grow your online sales while automizing your workflows.</p>



<p>Updates are a bit sporadic.  They seem to be about every month or so.</p>



<h3 class="wp-block-heading">7) <u><a href="https://designmodo.com/articles/" target="_blank" rel="noreferrer noopener nofollow">Designmodo</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="647" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-56-1024x647.png" alt="designmodo screenshot" class="wp-image-2342" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-56-1024x647.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-56-300x190.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-56-768x485.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-56-1536x971.png 1536w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-56.png 1647w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Mostly design-centric articles to help your email design skills. They help you get better at web design and email marketing: detailed tutorials and guides, case studies, and opinions from industry professionals.</p>



<p>You can see new articles roughly every week or so.</p>



<p></p>



<h2 class="wp-block-heading" style="text-transform:uppercase">Social Media Startup Blogs</h2>



<p>The best Social Media blogs provide readers with useful, actionable tips and advice on a wide range of topics related to social media. They offer a place for readers to connect with other like-minded individuals, share their own experiences, and learn from the successes and failures of others. And of course, they&#8217;re updated often with fresh content.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="490" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-29-1024x490.png" alt="social media startup blogs" class="wp-image-2267" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-29-1024x490.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-29-300x144.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-29-768x368.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-29.png 1107w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Here are some we like:</p>



<h3 class="wp-block-heading">1) <a href="https://www.socialmediatoday.com/" target="_blank" rel="noreferrer noopener nofollow"><span style="text-decoration: underline;">SocialMediaToday</span></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="778" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-76-1024x778.png" alt="Social Media Today screenshot" class="wp-image-2414" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-76-1024x778.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-76-300x228.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-76-768x584.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-76.png 1213w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>The latest news, trends, and tips in social media.  If it revolves around social media, it&#8217;s probably here.</p>



<p>They provide daily updates.</p>



<h3 class="wp-block-heading">2) <a href="https://www.socialmediaexaminer.com" target="_blank" rel="noreferrer noopener nofollow"><span style="text-decoration: underline;">Social Media Examiner</span></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="856" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-57-1024x856.png" alt="social media examiner screenshot" class="wp-image-2344" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-57-1024x856.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-57-300x251.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-57-768x642.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-57.png 1247w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Their tagline is &#8220;Your Guide to the Social Media Jungle&#8221;.  They help millions of marketers discover how to best use social media marketing to connect with customers, generate awareness, and increase sales.  You&#8217;re going to learn something every time you go here.</p>



<p>Expect new articles every day.</p>



<h3 class="wp-block-heading">3) <a href="https://www.thesocialmediahat.com/" target="_blank" rel="noreferrer noopener nofollow"><span style="text-decoration: underline;">The Social Media Hat</span></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="633" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-77-1024x633.png" alt="The Social Media Hat screenshot" class="wp-image-2417" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-77-1024x633.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-77-300x185.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-77-768x475.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-77.png 1341w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Founded by Mike Allton in 2011, The Social Media Hat is an award-winning resource for businesses around the world. Here you’ll find guides to plan successful virtual events, reviews of the best tools, and in-depth articles on social media strategies and tactics.</p>



<p>It is updated approximately every month or so.</p>



<h3 class="wp-block-heading">4) <a href="https://www.jeffbullas.com/" target="_blank" rel="noreferrer noopener nofollow"><span style="text-decoration: underline;">Jeff Bullas</span></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="866" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-58-1024x866.png" alt="Jeff Bullas screenshot" class="wp-image-2346" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-58-1024x866.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-58-300x254.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-58-768x650.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-58.png 1225w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Helping business and personal brands with digital marketing including social media with Blogs, Twitter, Facebook, LinkedIn, YouTube, and Search Engine Optimization.  Their goal is &#8220;To optimize your brand in a digital world&#8221;.</p>



<p>He seems to update the site every week or so.</p>



<h3 class="wp-block-heading">5) <a href="https://adespresso.com/blog/" target="_blank" rel="noreferrer noopener nofollow"><span style="text-decoration: underline;">AdEspresso</span></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="927" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-59-1024x927.png" alt="AdEspresso screenshot" class="wp-image-2348" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-59-1024x927.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-59-300x272.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-59-768x695.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-59.png 1150w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Owned by HootSuite.  They claim that their blog is the best resource to stay up to date with Facebook &amp; Google Ads news and tactics for successful campaigns that convert!</p>



<p>They seem to update the site with a new article every week or so.</p>



<p></p>



<h2 class="wp-block-heading" style="text-transform:uppercase"><strong>Finance / Legal / Venture Capital</strong> Startup Blogs</h2>



<p>Financing your startup can be complicated and tiresome. If you are in this phase, you probably have plenty of questions.  Be sure to view our list of <a href="https://blog.gravyware.com/best-venture-capital-firms">best venture capital firms</a>.   <a href="https://blog.gravyware.com/top-venture-capital-firms" data-type="post" data-id="1110">The top Venture Capitalists</a> provide funding for early-stage startups and help them to grow and scale their businesses.</p>



<figure class="wp-block-kadence-image kb-image_222a15-18 size-large"><img loading="lazy" decoding="async" width="1024" height="543" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-30-1024x543.png" alt="finance and venture capital startup blogs" class="kb-img wp-image-2269" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-30-1024x543.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-30-300x159.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-30-768x407.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-30.png 1271w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Some of the best blogs for more information can be found below.</p>



<h3 class="wp-block-heading">1) <u><a href="https://www.securedocs.com/blog" target="_blank" rel="noreferrer noopener nofollow">SecureDocs</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="889" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-60-1024x889.png" alt="SecureDocs blog screenshot" class="wp-image-2350" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-60-1024x889.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-60-300x260.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-60-768x667.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-60.png 1183w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Stay on top of the latest tips, trends, and best practices for M&amp;A, fundraising, and other business events.</p>



<h3 class="wp-block-heading">2) <u><a href="http://redrocketvc.blogspot.com/" target="_blank" rel="noreferrer noopener nofollow">Red Rocket VC</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="876" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-61-1024x876.png" alt="Red Rocket VC screenshot" class="wp-image-2352" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-61-1024x876.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-61-300x257.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-61-768x657.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-61.png 1206w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Red Rocket can help your business &#8220;blast off&#8221;!! Our Partners are proven CEOs and CMOs, that have already mastered the same growth challenges you are experiencing. They can help you with your growth strategy, execution, or financing needs such as venture capital. Check out their free e-books such as &#8220;101 Startup Lessons&#8221;.</p>



<p>Updates occur every month or so on this site.</p>



<h3 class="wp-block-heading">3) <a href="https://a16z.com/" target="_blank" rel="noreferrer noopener nofollow"><span style="text-decoration: underline;">Andreessen Horowitz</span></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="677" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-73-1024x677.png" alt="Andreesseen Horowitz (a16z) screenshot" class="wp-image-2379" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-73-1024x677.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-73-300x198.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-73-768x507.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-73.png 1338w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Commonly referred to as &#8220;a16z&#8221;, this is the blog/site of one of the biggest Venture Capital firms in Silicon Valley.  There&#8217;s a lot of wealth in these articles, and they are updated daily.  Check out their podcast as well.  Good stuff.</p>



<p>They have updates daily on this site.</p>



<h3 class="wp-block-heading">4) <a href="https://review.firstround.com/" target="_blank" rel="noreferrer noopener nofollow"><span style="text-decoration: underline;">First Round Review</span></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="544" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-74-1024x544.png" alt="First Round Review screenshot" class="wp-image-2381" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-74-1024x544.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-74-300x159.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-74-768x408.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-74-1536x815.png 1536w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-74.png 1716w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>This is a startup blog from First Round Capital and is made up of mostly guest posts from experts in their field.</p>



<p>There&#8217;s a wealth of great information here, and the articles are well-written.</p>



<h3 class="wp-block-heading">5) <a href="https://tomtunguz.com/" target="_blank" rel="noreferrer noopener nofollow">Tomasz Tunguz</a></h3>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="870" height="897" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-75.png" alt="Tomasz Tunguz screenshot" class="wp-image-2383" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-75.png 870w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-75-291x300.png 291w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-75-768x792.png 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></figure>



<p>Tomasz Tunguz is a VC at Redpoint and writes a blog post or two each week.  Topics include how to raise funds, KPIs that matter, and other questions that startup founders might need answering.</p>



<p>The articles are to the point and without the fluff.  Just the way we like it.</p>



<h3 class="wp-block-heading">6) <u><a href="https://www.onstartups.com/" target="_blank" rel="noreferrer noopener nofollow">OnStartups</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="760" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-68-1024x760.png" alt="OnStartups screenshot" class="wp-image-2368" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-68-1024x760.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-68-300x223.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-68-768x570.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-68.png 1398w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Dharmesh Shah maintains this site.  He&#8217;s an Angel Investor, and co-founder of HubSpot.  He knows what he&#8217;s doing.</p>



<p>This one has waned a bit with the updates, with only three new blog posts in 2022. It still has a wealth of information that is still very relevant.</p>



<p></p>



<h2 class="wp-block-heading" style="text-transform:uppercase"><strong>Startup</strong> News Sources</h2>



<p>While it&#8217;s important to see what the rest of the world is doing, we typically hit these once a day or so.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="523" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-31-1024x523.png" alt="startup news sources" class="wp-image-2271" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-31-1024x523.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-31-300x153.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-31-768x392.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-31.png 1275w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">1) <a href="https://techcrunch.com/" target="_blank" rel="noreferrer noopener nofollow"><span style="text-decoration: underline;">TechCrunch</span></a></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="674" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-40-1024x674.png" alt="TechCrunch screenshot" class="wp-image-2307" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-40-1024x674.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-40-300x198.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-40-768x506.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-40-1536x1012.png 1536w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-40.png 1564w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>TechCrunch has been around for a long time and remains one of the best sources for tech news. They report on the business of technology, startups, venture capital funding, and Silicon Valley in general.</p>



<p>If you want to know the details of what&#8217;s happening in the world of tech the minute it happens, this site is for you.</p>



<h3 class="wp-block-heading">2) <u><a href="https://www.youngupstarts.com/" target="_blank" rel="noreferrer noopener nofollow">Young Upstarts</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="1019" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-62-1024x1019.png" alt="Young Startups screenshot" class="wp-image-2355" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-62-1024x1019.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-62-300x300.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-62-150x150.png 150w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-62-768x764.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-62.png 1045w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Young Upstarts is an online business resource for startup entrepreneurs, small business owners, idea people, and intrapreneurs seeking change within their organizations.</p>



<p>They have daily updates on this site.</p>



<h3 class="wp-block-heading">3) <u><a href="https://startups.microsoft.com/en-US/blog/" target="_blank" rel="noreferrer noopener nofollow">Microsoft for Startups Blog</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="652" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-63-1024x652.png" alt="Microsoft for Startups blog screenshot" class="wp-image-2357" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-63-1024x652.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-63-300x191.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-63-768x489.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-63-1536x978.png 1536w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-63.png 1584w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Learn from founders who’ve been there before. Accelerate your startup with Microsoft for Startups Founders Hub.</p>



<p>There are many good articles here that often help you use Microsoft products.  Surprise!  Many of the guest authors have partnered with Microsoft.</p>



<h3 class="wp-block-heading">4) <u><a href="https://startupnation.com/" target="_blank" rel="noreferrer noopener nofollow">StartupNation</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="821" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-64-1024x821.png" alt="StartupNation screenshot" class="wp-image-2359" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-64-1024x821.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-64-300x241.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-64-768x616.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-64.png 1301w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Want to learn how to start a business? StartupNation has the resources you need to ensure your success.</p>



<p>This is a great resource that is updated daily.</p>



<h3 class="wp-block-heading">5) <u><a href="https://www.techstars.com/the-line" target="_blank" rel="noreferrer noopener nofollow">Tech Stars</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="634" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-65-1024x634.png" alt="TechStars The Line screenshot" class="wp-image-2361" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-65-1024x634.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-65-300x186.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-65-768x476.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-65-1536x951.png 1536w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-65.png 1665w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Techstars is a global platform for investment and innovation. They connect entrepreneurs, investors, and corporations.&nbsp;This blog contains ideas &amp; insights from the Techstars network.</p>



<p>There are many sections to this blog, and most seem to be updated every week or so.</p>



<h3 class="wp-block-heading">6) <u><a href="https://thestartupmag.com/" target="_blank" rel="noreferrer noopener nofollow">The Startup Magazine</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="664" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-66-1024x664.png" alt="The Startup Magazine screenshot" class="wp-image-2363" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-66-1024x664.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-66-300x194.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-66-768x498.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-66.png 1208w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>The Startup Magazine aspires to educate and inspire startups. They provide advice, access to business tools, and tell great entrepreneur stories.</p>



<p>It&#8217;s not our favorite layout, but the site is updated pretty much daily.</p>



<h3 class="wp-block-heading">7) <u><a href="https://www.killerstartups.com/" target="_blank" rel="noreferrer noopener nofollow">Killer Startups</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="804" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-67-1024x804.png" alt="killerstartups screenshot" class="wp-image-2365" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-67-1024x804.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-67-300x236.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-67-768x603.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-67.png 1307w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Great place to showcase your app and read articles from other founders.</p>



<p>Update daily with shorter, to-the-point articles.</p>



<p></p>



<h2 class="wp-block-heading" style="text-transform:uppercase"><strong>International</strong> Startup News Sources</h2>



<h3 class="wp-block-heading">1) <u><a href="https://magazine.startus.cc/" target="_blank" rel="noreferrer noopener nofollow">StartUs Magazine</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="954" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-69-1024x954.png" alt="StartUs Magazine screenshot" class="wp-image-2369" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-69-1024x954.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-69-300x279.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-69-768x715.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-69.png 1111w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Europe&#8217;s leading source on daily happenings in the startup community, reaching over 400.000 people monthly.</p>



<p>This blog/site has a section for pretty much every area a startup founder may need, and it&#8217;s updated daily.</p>



<h3 class="wp-block-heading">2) <u><a href="https://yourstory.com/" target="_blank" rel="noreferrer noopener nofollow">YourStory</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="804" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-70-1024x804.png" alt="YourStory screenshot" class="wp-image-2371" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-70-1024x804.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-70-300x236.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-70-768x603.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-70.png 1166w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>This is India&#8217;s biggest platform dedicated to fostering the startup ecosystem via entrepreneurship-related stories, resources, products, research reports, and more.</p>



<p>It&#8217;s updated daily.</p>



<h3 class="wp-block-heading">3) <u><a href="https://startups.co.uk/" target="_blank" rel="noreferrer noopener nofollow">Startups.</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="658" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-71-1024x658.png" alt="Startups. screenshot" class="wp-image-2373" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-71-1024x658.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-71-300x193.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-71-768x493.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-71-1536x986.png 1536w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-71.png 1615w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Starting a business? Startups is the UK’s leading independent, online resource for anyone starting and growing a business. Find independent advice, tools, events, and information for new businesses, start-ups, small businesses, and ambitious entrepreneurs.</p>



<p>It&#8217;s updated daily for the most part.</p>



<h3 class="wp-block-heading">4) <u><a href="https://e27.co/" target="_blank" rel="noreferrer noopener nofollow">e27</a></u></h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="923" src="https://blog.gravyware.com/wp-content/uploads/2022/10/image-72-1024x923.png" alt="e27 screenshot" class="wp-image-2375" srcset="https://blog.gravyware.com/wp-content/uploads/2022/10/image-72-1024x923.png 1024w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-72-300x270.png 300w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-72-768x692.png 768w, https://blog.gravyware.com/wp-content/uploads/2022/10/image-72.png 1152w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Get access to insights, updates, and resources that let you learn more and connect with investors and startups in Southeast Asia.</p>



<p>The site is well laid out, and updated daily.</p>



<p></p>



<h2 class="wp-block-heading" style="text-transform:uppercase">Conclusion</h2>



<p>There you have it! These are some of the best startup blogs that you should be reading if you&#8217;re looking to grow your SaaS startup.</p>



<p>Please let us know your thoughts and if we missed any!</p>



<p></p>



<h2 class="wp-block-heading">You Might Also Like</h2>



<ul class="wp-block-list">
<li><a href="https://blog.gravyware.com/best-social-proof-tools-to-improve-your-business" data-type="post" data-id="2017">The 21 Best Social Proof Tools to Improve Your Business</a></li>
</ul>



<div class="wp-block-kadence-column kadence-column_e6036c-58 inner-column-1"><div class="kt-inside-inner-col">
<div class="wp-block-kadence-column kadence-column_08a9b5-2b kb-section-dir-horizontal inner-column-1"><div class="kt-inside-inner-col">
<div class="wp-block-kadence-icon kt-svg-icons kt-svg-icons_484c34-cc alignnone kb-icon-valign-middle">
<div class="kt-svg-style-default kt-svg-icon-wrap kt-svg-item-_7d698a-68"><span class="kb-svg-icon-wrap kb-svg-icon-fe_info"><svg viewBox="0 0 24 24"  fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"  aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12" y2="8"/></svg></span></div>
</div>



<span class="kt-adv-heading_d5ff3f-a3 wp-block-kadence-advancedheading" data-kb-block="kb-adv-heading_d5ff3f-a3">Disclosure</span>
</div></div>



<p>Some of the links in this article may be affiliate links, which can provide compensation to me at no cost to you if you decide to purchase the product.</p>
</div></div>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 

Served from: blog.gravyware.com @ 2026-04-20 16:16:43 by W3 Total Cache
-->