how to change wordpress theme

How to change a WordPress theme

Used before category names. Blog WordPress WordPress Theme

How to change a WordPress theme and how easy the changing a WordPress theme? You will find out in this article. In this article, we are going to discuss changing the WordPress theme and template with WordPress itself and manually (with the server file manager or FTP and database) on a live website (Cpanel and DirectAdmin) and offline one (WampServer and Xampp).

In this tutorial, you are going to learn the best way to change the WordPress theme. If you follow these steps, you won’t lose any data and traffic on changing the WordPress theme. So, be with us.

Read more about the Best WordPress Website Theme

Article Content

What will happen if you change WordPress theme?

You decided to change your WordPress theme because of many reasons or for fun. What will happen? Are you losing your data and content by changing the theme?

  • Some of your site’s elements may stop working. Your new theme may not be compatible with one or more of your plugins.
  • Any customizations you’ve made to your theme will disappear. If you’ve altered your theme’s code – or even set up a child theme – those changes will be lost.
  • Your pages may not display correctly. Some themes contain their own visual features that may not translate well to other themes. For example, if you used a page builder to create your pages, its elements might not play nicely with your new pick. Or, you might’ve used some custom shortcodes that are specific to your theme.

Then your non-related content won’t be changed:

  • Posts and Pages
  • WordPress settings
  • Plugins content and settings
  • Basic information on our website

But related content to your old theme will be changed mostly.

  • Theme style codes: All custom CSS styles that are added by the theme will be gone.
  • Theme shortcodes: Shortcodes that are added by the theme will be gone too.
  • Theme-specific widgets: Some themes add widgets to increase the functionality of WordPress. These widgets won’t be accessible.
  • Your navigation bar and sidebar: Navigation bars and custom sidebars will be changed.
  • Your logo or favicon could disappear: Some themes add their own settings for favicon and logo.

Then by changing the WordPress theme we won’t lose our critical content.

Thing’s to do before changing theme

In this step, before starting to change the WordPress template, you have to do some primary things. These tasks are necessary to continue. These steps assure you that you won’t lose important data. For example, if you don’t have a backup of your website and things go wrong, you will face a real problem if you are working on a live website.

1. Choose the proper WordPress theme

Choosing the proper WordPress theme is the first step.

  • The theme must have a lower loading time (high speed). Remember, WordPress speed is an important factor in user experience and SEO, so you need to make sure that the new theme is faster than your previous one.
  • The theme should be responsive because most users are visiting your website on their smartphones.
  • Your chosen theme should be beautiful to increase user experience (UX).

2. Back up your website

If you are working on a live website, it is necessary to get a backup of whole your website. You can use plugins or server backup to do the task.

Here are WordPress backup plugins:

How to change a WordPress theme?

There is no difference to change the WordPress theme between a live website and an offline website by WordPress itself.

We assume you have a website running with WordPress and you want to change its theme.

1. Install WordPress theme

Log in to your WordPress dashboard. Go to “Appearance -> Themes” and click “Add New”.

how to change a wordpress theme
how to install a wordpress theme

You can search for it by name of your chosen theme and click the install button:

how to change a wordpress theme

Or if you purchased a premium theme or otherwise have a ZIP file, you can upload the ZIP file by clicking the “Upload Theme” button:

Once you install your new theme, don’t click the “Activate” button yet.

how to change a wordpress theme

Activating the installed theme will change the theme, we will do it later but now it is too soon.

2. Copy snippet codes

All themes are not completely cover your needs. Sometimes you have to code to match your needs and theme. Most of the time these codes are written in “functions.php” file of the theme. Copy your extra snippet codes from the old theme to the new one.

If you don’t know about the codes or the designer did it for you, ask a WordPress expert to do this for you.

Almost every CSS code that is added by the designer won’t work in the new theme because this code is written based on old theme classes and those classes don’t exist in the new theme.

3. Copy Google Tag and Analytics codes

Some users add their analytics tracking code directly to the header.php file or on some themes in the theme’s settings. You have to move them too. The safest way to add Google tags to your website is through a plugin like MonsterInsights.

Don’t worry about Google tags, if you lost them you can get them from Google and add them again.

4. Sidebars content

Almost every theme creates custom sidebars. The content of these sidebars is important. You have to be sure that the content of the sidebars is OK and works fine.

How to change WordPress theme without going live (without breaking your website)

Now you installed your chosen theme and copied snippet codes from the old one to it. In this step, you are going to change the new theme setting to cover your needs.

Every theme has a Customization section. You can reach this section by going “Appearance -> Customize” in the WordPress dashboard.

The Customize section has a preview. If you change anything in this section you could see the change in the preview. In this section, you change the new theme to cover your needs.

Sometimes themes have customization by themselves. Sometimes it has its own preview and sometimes doesn’t. You will change these items in the customization section.

There are plugins to preview themes without going live on WordPress websites like “Theme Switcha”. This plugin switches between themes, you can test everywhere on your website before activating the theme.

Go “Settings -> Theme Switcha” and check “Enable theme switching” and save changes.

After saving the changes you can switch between themes at the end of this page. This plugin will now display all your installed themes at the bottom of this page. Go ahead and click on your new theme to preview it on a new tab of your web browser.

After customization, now you could activate the new theme on “Appearance -> Themes“.

how to change a wordpress theme

How to change WordPress theme manually

Sometimes your website faces problems with errors that you can’t access your WordPress Dashboard. If the problem occurs in the current theme, you have to change it manually on the database and server files. In this section, you are going to change a WordPress theme without the Dashboard.

It means you have to access your server and database and do the job with the server file manager or FTP.

Download your theme from wordpress.org or from where you purchased it. Upload the zip file on the server with the server’s file manager or FTP.

Upload the file in

  • Cpanel and DirectAdmin on “public_html/wp-content/themes”
  • WampServer on “www/wp-content/themes”
  • Xampp on “htdocs/wp-content/themes”

If you are going to change a WordPress theme on the server, use Cpanel or DirectAdmin, and if you are going to change a WordPress theme on localhost use WampServer or Xampp based on your web service.

Unzip the theme.

Now your theme file is ready but not activated yet. To activate the theme go to phpMyAdmin on your server.

Click on your database name and click on “wp_options” table.

In this table search for “template” and “stylesheet“.

Click on edit and change the name to your theme slug. In this example, our old theme slug is “astra“. The slug is your theme folder name in the themes folder you uploaded.

Change the slug and click on “Go”. Now your theme has been changed and you can reload your website.

In this method, your code snippets don’t move from the old theme to the new one. You have to move them after changing the theme. This method doesn’t suit for change the WordPress theme on the live site. We use this method if we face problems on our WordPress website and we don’t have access to Dashboard.

Things to do after changing your theme

Now you changed your theme and your website is live. It’s time to start the testing process. That means going through each of your pages, posts, and plugins to look for errors. Be sure everything is OK. Test every part of your website to be sure.

Your website should be responsive, check it with smartphones too. To make sure that your website looks good in every major browser, you should test your site in different web browsers including Google Chrome, Firefox, Safari, and Internet Explorer.

If you don’t use a plugin to add Google tags, add them too.

Breadcrumbs and schema markup are things you don’t want to forget about because they can drastically change your site’s UX and rankings if you suddenly change things around.

Frequently Asked Questions

How to change the WordPress theme in the database?

Changing the WordPress theme in the database is not just about the database. You could use how to change the theme manually that we discussed in this article.

How to change the WordPress theme without losing content?

In this tutorial, we learned how to change the WordPress theme step by step. If you follow our steps, you could change a WordPress theme without losing content on the live site.

How to change a WordPress theme offline?

If offline mean changing the theme in localhost? In this article, we discussed how to switch WordPress theme step by step.

If offline means switching a WordPress theme without going live? You should read How to Change WordPress Theme Without Going Live (Without Breaking Your Website).

How to change a WordPress theme to a child version?

If you have a child theme of your original theme, changing won’t cause any problem. But sometimes users add extra functionalities on the child themes that you have to care for them.

How to change a WordPress theme through Xampp or WampServer?

Xampp or WampServer is a software that installs PHP, MySQL, and Apache on your system locally to install WordPress on a local host. Changing the WordPress theme through Xampp or WampServer is not different from than server. This tutorial discusses how to change a WordPress theme on Xampp or WampServer.

Tags: