This guide explains which types of code can be added to your website, depending on your WordPress.com plan.
The type of code you can add to a WordPress.com website depends on your plan level:
- Free sites and sites with a Starter or Explorer plan have limits to code that can be added, as explained in this guide. Restrictions are in place to ensure the safety and security of all sites that share this hosting environment.
- Plugin-enabled plans (Creator and Entrepreneur) have no limits to the code you can add. In this guide, we’ll explain the recommended methods for adding various types of code.
Plugin-enabled sites do not have code restrictions because we separate your site from the shared WordPress.com hosting environment, making substantial infrastructure changes behind the scenes to help keep your site secure. Because of these changes, once you activate a plugin-enabled site, you can add any code you want anywhere on your site, including inline frames (iframes) and JavaScript.
⚠️
Be extra careful when adding custom code that may make your site vulnerable to attacks. We recommend that you only add code that comes from a reputable source. If you are ever in doubt, err on the side of caution and look for an alternative method.
If you wish to use an iframe, javascript, or other code on a site without plugins, consider the following alternatives:
- There are several ways to safely share videos, audio files, and documents on any WordPress.com site.
- You can embed content from many popular services without code. See the full list of supported platforms, including YouTube, Spotify, Giphy, all major social media platforms, and more.
- WordPress.com includes many additional features accessible without the need for code or plugins. This includes contact forms, galleries, Google Analytics, payment buttons, events, polls, quizzes, appointment scheduling, restaurant bookings, and more. See this guide for a list of included features.
HTML is the language of every webpage you visit on the internet. It uses special codes (called tags) to structure and organize the content of a webpage, such as text, images, links, and multimedia. All WordPress.com sites can use the following HTML tags:
a
address
abbr
acronym
area
article
aside
b
big
blockquote
br
caption
cite
class
code
col
del
details
dd
div
dl
dt
em
figure
figcaption
footer
font
h1, h2, h3, h4, h5, h6
header
hgroup
i
img
ins
kbd
li
map
mark
ol
p
pre
q
rp
rt
rtc
ruby
s
section
small
span
strike
strong
sub
summary
sup
table
tbody
td
tfoot
th
thead
tr
tt
u
ul
var
In addition, sites with a plugin-enabled plan can use the following codes:
embed, frame, iframe, form, input, object, textarea, script, style, link
You can access and edit the HTML of any page in the WordPress editor.
CSS handles the presentation and appearance of HTML web content. CSS can control the colors, fonts, sizes, spacing, and positioning of elements on a webpage.
CSS editing is supported on sites with an Explorer plan and above. See our Custom CSS guide to learn more.
JavaScript brings interactivity and dynamic elements to web pages. JavaScript is used to create engaging features like interactive forms, animations, and responsive design.
JavaScript codes typically begin with a <script>
tag and may be used on sites with a plugin-enabled plan.
JavaScript from trusted partners, such as YouTube and Google Maps, can be converted to a supported embed or shortcode on any plan.
With the limitations described above, add code to your site using the most appropriate method for your goals:
- Embed code onto a page or post using the Custom HTML block.
- Upload images, video, audio, and documents directly. See Accepted File Types for more.
- Verify your site with Google Search, Bing, Pinterest, Yandex, and Facebook Business. See Site Verification Services.
- Display source code using the SyntaxHighlighter Code block.
Plugin-enabled sites only:
- Add verification codes for services like AdSense, Facebook, and Mailchimp. See Add Code to Headers.
- Add code to functions.php via a plugin like Code Snippets.
- Edit your site files directly via secure FTP (SFTP).
- Install a plugin to add virtually any feature to your website.
- Create a child theme to make theme modifications.