Wordpress Question

Zarkon

Senior Member
Joined
Jun 6, 2014
Messages
948
Reaction score
6
Location
PT
I'm new to wordpress,i installed a theme and followed a tutorial on youtube for learning purposes. I then installed a new free theme which i'm going to use and edit,so my question..

When i activate the new theme,the content of the previous theme still shows in this theme. I realise this is a database thing,so how do i go about when i want to change between themes what do i need to change in the database that i created for wordpress every time i change between themes.
 
I'm new to wordpress,i installed a theme and followed a tutorial on youtube for learning purposes. I then installed a new free theme which i'm going to use and edit,so my question..

When i activate the new theme,the content of the previous theme still shows in this theme. I realise this is a database thing,so how do i go about when i want to change between themes what do i need to change in the database that i created for wordpress every time i change between themes.

You dont have to change the database or anything to that extent, the new theme should have a file within it to import all content related to that theme, if this is a blank theme ie. just layout or style change then it will still use your old site content.
 
You dont have to change the database or anything to that extent, the new theme should have a file within it to import all content related to that theme, if this is a blank theme ie. just layout or style change then it will still use your old site content.

The thing is when i activate the new theme the theme does show,but the content from the previous theme is in this theme. That's why i'm thinking it is database related,and if i should create a new database or change something in there to point it to the new theme. Also for example when i click on pages,so that i can start with a new menu and pages,the previous theme's menu and pages are showing. Shouldn't it have been deactivated so that i can add the new menu and pages
 
A theme is just that, a theme. It doesn't replace content, if it did then changing the theme of an existing site would be an absolute balls up.
 
[XC] Oj101;16231732 said:
A theme is just that, a theme. It doesn't replace content, if it did then changing the theme of an existing site would be an absolute balls up.

I'm trying to understand why the content of my previous theme carried over to this theme when i deactivated it. Example i'm in the new theme and i start editing it,it affects the previous theme,when i switch back to that theme. Doesn't wordpress start "Over" when u select the new theme. That's why i thought it is database related,the new content should be saved on its own in the new theme right? That's what switching(activating/deactivating) between themes are for,to start on a new project?
 
I'm trying to understand why the content of my previous theme carried over to this theme when i deactivated it. Example i'm in the new theme and i start editing it,it affects the previous theme,when i switch back to that theme. Doesn't wordpress start "Over" when u select the new theme. That's why i thought it is database related,the new content should be saved on its own in the new theme right? That's what switching(activating/deactivating) between themes are for,to start on a new project?

A theme doesn't have content, a theme is just "menu colour is x", "background colour is y", "menu position is z", etc. Menu items and page content are not part of a theme. Switching themes is to change the appearance of a site, not its content.

Eg go to the bottom of this page and change the theme from MyBroadband-Default to any on of the others. It doesn't load up an entirely different forum, it's just a different theme for the site.

Another example (and this is a very basic one) is change your background picture on your desktop - you don't suddenly lose all your desktop icons just because the image changed.
 
I'm trying to understand why the content of my previous theme carried over to this theme when i deactivated it. Example i'm in the new theme and i start editing it,it affects the previous theme,when i switch back to that theme. Doesn't wordpress start "Over" when u select the new theme. That's why i thought it is database related,the new content should be saved on its own in the new theme right? That's what switching(activating/deactivating) between themes are for,to start on a new project?

As [XC] Oj101 said above - changing your theme won't affect your content.

If I had to oversimplify - WordPress basically has two seperate entities that operate in concert to generate your site - your theme, which controls the appearance of you website - the color of your menus, font family, size and color - and then the database, which contains all your content ie - any text that appears on your website.

If you actually want new content, you would need to physically delete all the pages/posts in your back-end, or dump your database and create a new one - changing your theme will have zero impact on content already on the site, apart from changing its appearance. Even if you change your theme, the content still gets pulled from the same database.
 
[XC] Oj101;16231972 said:
A theme doesn't have content, a theme is just "menu colour is x", "background colour is y", "menu position is z", etc. Menu items and page content are not part of a theme. Switching themes is to change the appearance of a site, not its content.

Eg go to the bottom of this page and change the theme from MyBroadband-Default to any on of the others. It doesn't load up an entirely different forum, it's just a different theme for the site.

Another example (and this is a very basic one) is change your background picture on your desktop - you don't suddenly lose all your desktop icons just because the image changed.
Yup i fully understand what u meant about that and the content,my understanding was that each theme is a new "project" which i can then put my content in .So how do i switch between "projects" in wordpress? SO that i have all my different "websites" showing in the editor,so that i can switch between them to work on.

"each theme is a new "project" <--- This was my problem,sorry. SO i guess now how does one set up a new project each time.
 
As [XC] Oj101 said above - changing your theme won't affect your content.

If I had to oversimplify - WordPress basically has two seperate entities that operate in concert to generate your site - your theme, which controls the appearance of you website - the color of your menus, font family, size and color - and then the database, which contains all your content ie - any text that appears on your website.

If you actually want new content, you would need to physically delete all the pages/posts in your back-end, or dump your database and create a new one - changing your theme will have zero impact on content already on the site, apart from changing its appearance. Even if you change your theme, the content still gets pulled from the same database.

Thanks for the reply,yup that's what i stated in the OP that this is database related and that i should create a new database for a "new project" .
 
Yup i fully understand what u meant about that and the content,my understanding was that each theme is a new "project" which i can then put my content in .So how do i switch between "projects" in wordpress? SO that i have all my different "websites" showing in the editor,so that i can switch between them to work on.

"each theme is a new "project" <--- This was my problem,sorry. SO i guess now how does one set up a new project each time.

You will then need to deploy different Wordpress instances to have different projects as you say. Register a sub domain and do this or generate your whole site on one sub domain and move it over to another when your complete with it and alter its theme that's about the only way you can have two different "projects".

each Wordpress instance is locked to that site.
 
You will then need to deploy different Wordpress instances to have different projects as you say. Register a sub domain and do this or generate your whole site on one sub domain and move it over to another when your complete with it and alter its theme that's about the only way you can have two different "projects".

each Wordpress instance is locked to that site.

Ah ok i understand now,i was thinking my login to the wordpress was my "User profile" to keep using always but this is only a project . I'm using xampp to develop offline,so the best way is to save the project folder "wordpress" that is in htdocs to keep somewhere. Then i can go back into wordpress and delete all the content and start over again. Instead of setting up a new database and wordpress user and pass each time?
 
Ah ok i understand now,i was thinking my login to the wordpress was my "User profile" to keep using always but this is only a project . I'm using xampp to develop offline,so the best way is to save the project folder "wordpress" that is in htdocs to keep somewhere. Then i can go back into wordpress and delete all the content and start over again. Instead of setting up a new database and wordpress user and pass each time?

Nope, I wouldn't copy it out and replace it that way what I would do is create 2 folders in your HTDOCS one being projects 1 and the other project 2.

Then create these separately so copy your downloaded files from Wordpress org into one project folder and run the setup like you have already then copy the Wordpress org files to the projects 2 folder then setup that from the beginning this creating 2 databases for each project this is simple in MySQL.

If you want to have a duplicate of project one to project 2 with a different theme you still have to create a new database and do a Wordpress migration.
 
Nope, I wouldn't copy it out and replace it that way what I would do is create 2 folders in your HTDOCS one being projects 1 and the other project 2.

Then create these separately so copy your downloaded files from Wordpress org into one project folder and run the setup like you have already then copy the Wordpress org files to the projects 2 folder then setup that from the beginning this creating 2 databases for each project this is simple in MySQL.

If you want to have a duplicate of project one to project 2 with a different theme you still have to create a new database and do a Wordpress migration.

Thanks, i figured it might be better to have another separate project folder in there,i understand now how it works,going to try it tonight.
 
Also check out multisite

As said before:
Wordpres has a database with default tables.
Your theme reads the info from those tables and displays it to the user.
Changing the theme still reads the same data but displays it differently.

To have a "clean" database each time you need to look into multisites or create a new wordpress installation each time.
 
Last edited:
You can create another user with admin privileges and delete the the original admin (that created the content) and it will ask you if you want to delete that users content or attribute it to someone else.
 
Top
Sign up to the MyBroadband newsletter
X