Want to effort editing WordPress CSS, but no idea where to start? With CSS styling, you tin edit your site'due south appearance globally or on certain pages. Add together colors, space out certain elements, design a layout, and basically alter exactly how anything in your WordPress theme looks.

If yous want to get more than familiar with WordPress' development environment, or but have finer command over your website'due south appearance, yous'll need to know how to add CSS in WordPress (plus how to change what's already there).

By editing your theme and including boosted CSS of your own, you'll be able to optimize each and every visual element on your site. Today, we'll take a closer look at it.

Ready to kickoff? Allow's exercise it!

Prefer to scout the video version?

What Is CSS Editing?

CSS stands for Cascading Way Sheets and information technology's the nigh popular spider web language besides HTML. The two of them go mitt-in-hand, every bit CSS is used to style HTML elements. HTML lays the groundwork of a website's appearance and CSS is used to further style it.

w3school
Case of CSS code (Source: w3schools.com)

CSS gives y'all the ability to make a website responsive, add colors, alter fonts, modify the layout, and in full general fine-tune a website's visual presentation. Like HTML and JavaScript, CSS is a frontend customer-side language, which means information technology executes on the user's finish, rather than on the backend server.

When diving into WordPress development, HTML, CSS, JavaScript, and PHP are the languages you'll need to know. This is what the core CMS is built in, as well every bit its many themes and plugins.

But fifty-fifty if you're non a web designer or developer, information technology'due south good to selection up a little CSS, as you can use it to move or mode elements on your website, or make small aesthetic changes to your theme to better suit yous.

Set up to give your #WordPress site a custom expect & feel? 👀 Larn how to use CSS styling to edit colors 🎨, alter the layout ✨ & more Click to Tweet

WordPress and CSS

Within WordPress, CSS is a niggling bit different. Information technology's controlled by themes, which are made up of template files, template tags, and of course the CSS stylesheet. Though generated by your theme, all of these are editable by you.

Template files split parts of your website into sections (such as header.php or archive.php), and template tags are used to call on them and other content from your database. These files are actually made up of more often than not PHP and HTML, though you lot could add together CSS if you lot needed to.

What you're really looking for is the stylesheet, or style.css. To alter how your website looks, you'll demand to learn how to add and edit code in this file.

How to Customize Your WordPress Theme with CSS

If you want to customize your theme and change how your site looks with CSS, you lot'll need to either add your own code or edit what'due south already at that place. At that place are ways to add CSS without ever needing to touch on any theme files but to change existing theme code, you'll have to access your site's stylesheet.

As yous brand these changes, in that location's one affair you should know: when your theme updates, any edits you've made to style.css, functions.php, or other theme template files will be erased. In general, you shouldn't be making direct changes to your website in the editor without using a child theme.

The stylesheet is similar a "list of instructions" for your website, setting exactly how it's styled and how the CSS lawmaking is handled. This is where you'll do the majority of your editing, just we'll also show y'all how to access other theme template files, such as header.php and footer.php.

There are ii means to access your WordPress website's stylesheet: through the WordPress dashboard or via an FTP customer. We'll cover both of them.

Not comfortable doing this yourself? Consider hiring a WordPress programmer to handle that step for y'all.

Editing WordPress CSS in the Dashboard

The easiest and near convenient way to access your CSS stylesheet is right in the WordPress dashboard. No need to install FTP programs or code editors. You tin can directly edit whatsoever file with syntax highlighting and part documentation congenital in.

Before you practice any major edits to cadre files, y'all should always fill-in your WordPress site. It's very easy to accidentally make a mistake that could intermission your site'due south advent if yous're new to CSS, and it could be difficult to figure out how to revert your changes.

Once y'all've made a backup and a kid theme, log in to your backend. You can find the editor by going to the menu and clicking Appearance > Theme Editor.

Y'all should see a popup warning you against making directly edits to these files. Don't worry, only click "I understand". It's but a alert to use a child theme and fill-in your website before yous brand any major changes. Follow those steps, and it's rubber to edit.

edit themes
Making direct edits to WordPress files

And at present y'all're in! You lot should be on the stylesheet past default but wait to the menu on the right to view your theme files if non.

Besides style.css, you'll as well have access to template files similar functions.php, header.php, and single.php. All of these bear on how sure pages on your site act.

Merely you should familiarize yourself with PHP before diving into these particular files.

Editing the style.css stylesheet in a WordPress theme
Editing the mode.css stylesheet in a WordPress theme

Just remember: well-nigh CSS changes you brand hither will be global. For case, if you alter your H1 headers to a certain font, it will accept effect for every unmarried page on your site. You'll need to use special syntax to customize specific pages' styling.

Edit Theme Files Directly

What if you tin't access the Theme Editor or prefer to practise your work over FTP? It's easier to use the backend editor, but some themes or plugins may disable it. If that's the example, you'll need to connect to your website through FTP.

FTP, or File Transfer Protocol, allows you to remotely admission and modify a website'due south files. The first thing y'all'll need to do is download FileZilla or any other FTP client.

Next, you should contact your host and ask for your FTP credentials (host, port, and username/password if applicable). If your host has a dashboard, you might be able to find them by logging in.

FTP credentials in MyKinsta
FTP credentials in MyKinsta

Kinsta users' credentials are located in the MyKinsta dashboard under Sites > SFTP/SSH.

Once y'all have them, launch your FTP customer and enter that data. If information technology doesn't work, try putting "sftp://" before the URL in the Host section.

FileZilla
Using FileZilla

Once y'all're in, you tin can notice your style.css file by clicking the wp-content binder to open it, then your theme'south folder (like the Twenty Twenty theme), so scrolling until yous see manner.css.

Double click to open information technology (or right-click and select View/Edit) and make your modifications. Remember to save and upload back to the server.

If you lot need to edit other template files like dwelling house.php, single.php, archive.php, you can find them in the same binder every bit mode.css.

Editing your theme files, whether through FTP or the dashboard, isn't always necessary. In fact, it's better to avoid doing it if you're just adding some extra code.

For modest additions, here'southward the best mode to add CSS to your WordPress site.

How to Add Custom CSS in WordPress

If you're not looking to edit the existing CSS code, and just want to add your own styling instead, it's strongly suggested to employ ane of the following methods: WordPress customizer or using a dedicated plugin.

For one,  the CSS lawmaking added through one of these methods it's a lot easier to admission and use. Y'all don't need to worry about putting your new CSS in the wrong place or forgetting where you added it if you want to make modifications later.

Subscribe Now

Also, CSS added through one of these methods won't exist lost when your theme updates (though information technology may nonetheless disappear if you modify themes).

This means you don't demand to utilize a kid theme, and if something breaks, all you have to practice is remove the CSS y'all just added.

Do note that yous should even so keep a backup of your website, as some people have reported occasionally losing their CSS during major updates. However, this method is a lot more reliable than direct editing theme files.

While you can but add lawmaking to fashion.css and call it a day, if you don't want to create a child theme, make major edits to existing CSS in your theme, and potentially end up with all your work erased, it'due south best to either utilise the Additional CSS pick in the WordPress customizer or install a plugin.

one. Editing CSS Through WordPress Customizer

Instead of using the Theme Editor, try this. Log in to your WordPress backend and click Appearance > Customize to open the theme customization screen. Yous'll see a live preview of your website, with options on the left to customize elements like the colors, menus, or other widgets.

At the very bottom of this carte, yous should find the Boosted CSS box.

Click to open information technology. Yous'll exist taken to a new screen with a lawmaking input box and a few instructions. The Additional CSS screen includes syntax highlighting, only like the Theme Editor, along with validation that lets you know if your lawmaking is wrong.

additional CSS
Additional CSS in WordPress

Any code you write automatically appears in the preview expanse on the right unless it has an error (though you can choose to publish it anyway).

When you're done working, you can publish your code, schedule when it will take outcome, or save it as a draft to work on afterward. You can even get a preview link to share with others.

As you can encounter, the Additional CSS page is in many ways more powerful than the Theme Editor, and much more suited to adding code than messing with core files.

The CSS code you write here overwrites the default styling of your theme and it doesn't disappear when your theme updates. If y'all tin't see it "alive" on your preview, double-check you're using the correct selectors in your CSS code.

But like with the Theme Editor, CSS is global by default, but you can write code that targets specific pages.

The one downside is that, should you switch themes, anything y'all've written will be erased. Brand sure to back upward your CSS before moving to a new theme or y'all might cease up losing a lot of piece of work.

If you're struggling to use this option, or want a solution that works across themes and can more easily target certain pages, you should try a plugin instead.

2. Adding Custom CSS to WordPress Using Plugins

There are a few reasons y'all might desire to utilise a plugin to add together CSS to WordPress. While the part is similar to the Additional CSS card, styles will usually stick even if yous switch/update themes.

You may besides relish their UI more than, or similar the extra features like autocompletion. Some plugins even let y'all build CSS through dropdown menus, rather than having to write it yourself.

Simple Custom CSS

Simple Custom CSS is the almost popular CSS editor plugin, due to its ease of use, minimal interface, and lightweight backend. In short, it's a very small WordPress plugin that packs a large punch.

Simple Custom CSS WordPress plugin
Simple Custom CSS WordPress plugin

Setting upwards is a breeze and you'll see no negative impact on operation. Information technology works on whatever theme and includes syntax highlighting and fault checking.

Uncomplicated Custom CSS and JS

Simple Custom CSS and JS WordPress plugin
Uncomplicated Custom CSS and JS WordPress plugin

Simple Custom CSS and JS is a proficient alternative. It also lets you target the header, footer, frontend, or even the admin backend.

SiteOrigin CSS

SiteOrigin CSS WordPress plugin
SiteOrigin CSS WordPress plugin

SiteOrigin CSS is another option that too includes a traditional CSS editor. Y'all're able to switch betwixt it and the visual editor at any fourth dimension.

WP Add Custom CSS

WP Add Custom CSS WordPress plugin
WP Add together Custom CSS WordPress plugin

If you're struggling to add together CSS to specific pages, WP Add Custom CSS adds a custom CSS box to the editing screen, and besides comes with global styling.

CSS Hero

You lot may also want to consider trying a visual CSS editor. These take all the complicated coding and turn it into a series of easy-to-employ input fields and dropdown menus which handle all the programming for you.

CSS Hero
CSS Hero

CSS Hero is a premium visual editing plugin with some seriously powerful features (animation, device-specific edits, and non-subversive editing to name a few).

Where to Learn CSS

Ready to dive into CSS for yourself? These beginner tutorials will establish the basics and teach you the syntax y'all'll need to know to write your own functional CSS code.

Learn CSS
Learn CSS

Information technology can exist daunting, but unless you're trying to do something actually advanced, CSS isn't too difficult! Simple things like changing the background color or setting font styling are fairly like shooting fish in a barrel, and at that place are plenty of examples online.

(Suggested reading: l+ Modern Fonts to Use on Your WordPress Website)

Nearly programming tutorials you lot'll discover on the internet are completely free too. There'south plenty of information out there at no/footling toll.

Here are a few examples covering the best CSS tutorials for beginners.

  • W3Schools CSS Tutorial: There is an absolute ton of data to be found here: in-depth tutorials, examples, and references for y'all to work with. W3Schools' tutorials are equally simple and easy to follow as possible, and so fifty-fifty if you're a total beginner, this is a groovy identify to start.
  • Codeacademy Learn CSS: Through six costless hands-on lessons, you'll learn the basics of CSS. This is no simple video tutorial, merely an interactive lesson that has you working with actual code. With the pro version, you too get quizzes and freeform projects to work on.
  • Learn CSS in One Hour: Plenty of people want to learn a new programming language, just they just don't take the time to dedicate. Merely if you can set aside just i hr, you tin learn CSS with this free 20-part course. Even if you're not a chief past the end, you should have a good grasp of the nuts.
  • Introduction to Basic HTML & CSS for WordPress Users: Looking for something specific to WordPress? If yous've e'er struggled with writing HTML and CSS, this course is perfect for you. Information technology's paid, but comes with 52 lectures and five hours of video to learn from.

Learn how to use CSS to customize & optimize your website, from the colors used to the spaces between elements ✨ Click to Tweet

Summary

Equally a WordPress user, jumping into CSS might be confusing at starting time. Simply once y'all know how to edit your theme files and where to add together styling, you lot should accept no more trouble.

Theme files can be edited either from your backend or through FTP to change your site'southward appearance, but this should ordinarily exist avoided unless you need to edit the existing lawmaking.

If y'all only want to add your own CSS, apply the Boosted CSS page nether Appearance > Customize, or attempt a plugin if y'all need something more than powerful.

Edits to your stylesheet volition be lost upon theme update unless y'all use a child theme. The same isn't truthful for Additional CSS. Your code is rubber from updates but don't forget: only a plugin will retain CSS when y'all change themes.

Whatever method you choose, you should always keep regular backups of your website, including the stylesheet and custom code y'all've added. Now it's time to brush up on your CSS basics using the resources nosotros provided.

Happy styling!

Suggested reading: Best Web Design Courses Online


Save time, costs and maximize site operation with:

  • Instant help from WordPress hosting experts, 24/vii.
  • Cloudflare Enterprise integration.
  • Global audition achieve with 29 data centers worldwide.
  • Optimization with our congenital-in Application Performance Monitoring.

All of that and much more, in one programme with no long-term contracts, assisted migrations, and a 30-24-hour interval-coin-back-guarantee. Cheque out our plans or talk to sales to find the programme that's correct for you.