DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk4 min

Custom WordPress Theme and Content Import: Build and Move Your Site

Build a custom WordPress theme with block templates or PHP, then move content separately using WordPress’s WXR export and import tools.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To build a custom WordPress site and move existing content, handle two separate jobs: create or install a theme for the design, then export content as a WXR XML file and import it on the destination site. Choose a block theme if you want to edit site-wide layouts in the Site Editor; choose a classic theme if your project depends on PHP templates and the traditional theme system.

Choose a block theme or a classic theme

“Custom-coded” can describe either of WordPress’s two theme approaches. As WordPress Developer Resources puts it, “A WordPress theme represents the design of your website.” The theme controls presentation; posts, pages, and other content remain WordPress data.

As an Amazon Associate I earn from qualifying purchases.

Choose How it works Best fit
Block theme Uses HTML block markup in templates and supports editing site areas such as headers, footers, templates, and styles in the Site Editor. A new site whose owner wants to adjust full-site layouts in WordPress.
Classic theme Uses PHP templates and WordPress template tags; the template hierarchy determines which template is used for a request. A project built around PHP templates or traditional theme customization.

Block themes have been part of the WordPress ecosystem since version 5.9, according to WordPress.org’s Block themes documentation. Check the version and configuration of your own WordPress installation rather than assuming a particular setup. If your site or required plugins depend on classic theme behavior, verify compatibility on that site before choosing.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Build the theme structure

For a block theme

A minimal block-theme structure includes a stylesheet, a block template, and, typically, a configuration file:

#1 Best Overall
wordpress hosting
  • easy to use
  • Free app
  • Compatible with all devices
  • It gives the best comparison between ten different hosts
my-custom-theme/
├── style.css
├── theme.json
└── templates/
    └── index.html

WordPress identifies style.css and a template such as templates/index.html as the files needed for recognition of a block theme. Add directories such as parts/ for reusable template parts, patterns/ for reusable block patterns, and additional files under templates/ when you need layouts for other content contexts. See the Theme Structure guidance for the documented structure.

Use theme.json to configure global settings and styles, including color, typography, and block appearance controls. WordPress Developer Resources describes it as “a configuration file that lets you define the global settings, styles, and more for your theme.” The file is typically useful, but the handbook says it is not technically required. Values do not always determine the final appearance: WordPress defaults, theme settings, child-theme settings, and user configuration form an override order, with saved user settings able to take precedence. The Global Settings and Styles documentation explains the configuration model.

For a classic theme

A classic theme uses PHP templates to render pages and can call WordPress template tags to display content. Its style.css contains theme metadata, and index.php serves as a catch-all template; other PHP templates can be added for the contexts required by the site. WordPress selects among them using the template hierarchy. The Theme Handbook’s required-file guidance is framed around review of themes submitted to the theme directory, so treat it as that review context rather than a universal checklist for every private theme.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Export content separately from the theme

To move posts and pages, use the source site’s WordPress content export. In the dashboard, open Tools > Export, choose all content or apply available filters such as post type, author, date range, and status, then download the export file. WordPress creates a WXR XML file containing supported content data such as posts, pages, comments, custom fields, taxonomies, and users. The Tools Export screen documentation describes the options.

  1. On the destination site, open Tools > Import.
  2. Select the WordPress importer and follow its prompts to upload the WXR file.
  3. Review the importer’s available assignments and options, then run the import.

The importer supports content from a WordPress export, including posts, pages, comments, custom fields, and categories; consult the Tools Import screen documentation for its workflow. WXR is a content export, not a full-site backup or a theme installer.

If you have made block-theme changes in the Site Editor and want to package those changes, use the Editor’s separate Export action. It downloads a ZIP containing templates, template parts, and style settings; it is not the WXR content file. See WordPress.org’s Site Editor documentation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Check the destination after import

Do not assume the imported site will look or behave exactly like the source. The theme determines how content is presented, and media is handled through the WordPress media library and its relationship to posts. WordPress documents that uploaded files are represented in the media library and can be attached to posts; themes can display attachment content through templates. Check the media attachment documentation for those behaviors.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Open representative posts and pages and confirm that their content is present.
  • Check authors and taxonomies where they matter to the site.
  • Review navigation and site-wide layouts under the destination theme.
  • Verify that images load and appear in the intended posts, and inspect the destination media library.
  • Confirm that the active theme’s templates render the imported content as intended.

Media transfer can depend on the actual import and hosting setup; the documentation does not establish that every file will transfer automatically in every situation. Treat these destination checks as part of the migration, not as optional polish.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.