title: WordPress: Check if Plugin is installed
body: <p>I want to check if Yoast SEO is installed in WordPress. I have activated Yoast SEO in my Test Environment, but it's not working out.</p>
  
  <p>In the <strong>wp-seo-main.php</strong> of Yoast, there's this line on line 16:</p>
  
  <pre><code>define( 'WPSEO_VERSION', '3.4' );
  </code></pre>
  
  <p>So I thought, that's a good line to check if Yoast is installed and running, so I did:</p>
  
  <pre><code>if ( defined( 'WPSEO_VERSION' ) ) {
      echo '&lt;script&gt;alert("Yes, defined");&lt;/script&gt;';
  } else {
      echo '&lt;script&gt;alert("No, undefined");&lt;/script&gt;';
  }
  </code></pre>
  
  <p>But it gives me "No, undefined". How weird, because it should be defined.</p>
  
  <p>Anyone got an idea? I'm totally out of ideas.</p>