Home > Back-end >  How can I fix the all data or how can I save the data with my theme?
How can I fix the all data or how can I save the data with my theme?

Time:10-05

Help, please. As a beginner theme developer, I have a question. Suppose, I have a theme that is developed by me. Now the question is, I have created menus, posts, pages, etc. When I install the theme (Only) on another WordPress then all data have been removed. How can I fix the all data or how can I save the data with my theme? That means when I install the theme then all pages, posts, menus, or other data will be included automatically, Which I was created on the first WordPress.

CodePudding user response:

The main thing is data will be stored in the database...without database you cannot bring the existing menus, posts, pages, etc. into another WordPress website . Try alternating the theme in same WordPress package.

CodePudding user response:

So you have to differentiate two things:

  1. Migrating Wordpress means you want to move to another server (e.g. Local Development => Remote Production). In this case you want to export and import the database and change the url / or use a migration plugin). Additionally you need to also add the wp-uploads folder for attachments.

  2. If you want to ship the theme to other people who can use it and you think it might be neccessary that they have some content preconfigured, you can add stuff like pages/posts/menus directly within PHP or run some kind of importer.

  • Related