<p>From searching the files (i.e. 'craft/app/Craft.php' line 124) it looks like you can get it using:</p>

<pre><code>craft()-&gt;getSiteName()
</code></pre>

CC BY-SA 3.0
2014-11-24T16:08:53.567Z
Or, as with most things Craft, without the method call `craft()->siteName`.
Joshua Baker
CC BY-SA 3.0
2014-11-23T23:22:35.457Z
2014-11-23T23:22:35.457Z
Douglas McDonald
<p>I'm sure it's obvious, but how do I get the current site name from within a plugin?</p>

<p>I tried a few things, including</p>

<pre><code>craft()-&gt;systemSettings-&gt;getSettings('general')
</code></pre>

<p>Any ideas?</p>

<plugin-development>
SiteName in a plugin?
# SiteName in a plugin?

(Asked by: username_0 on 2014-11-23)

I'm sure it's obvious, but how do I get the current site name from within a plugin?
I tried a few things, including
craft()->systemSettings->getSettings('general')

Any ideas?

**Tags:** plugin-development


---

## 1 answers

### Answer by username_1 on 2014-11-23. Score: 4

From searching the files (i.e. 'craft/app/Craft.php' line 124) it looks like you can get it using:
craft()->getSiteName()

> **Comments:**
> **username_2**: Or, as with most things Craft, without the method call `craft()->siteName`.  

---

