WordPress remains one of the most widely used platforms for building institutional websites, blogs, service portals, departmental pages, and organisational communication platforms. For many universities, research institutions, and other institutions, WordPress offers a practical balance between developer control and content-team independence.
A WordPress website that looks good is not always ready to perform well in search. A site may have a beautiful homepage but still struggle because of slow loading pages, unstable layouts, heavy plugins, poor heading structure, missing metadata, unoptimised images, or weak structured data. These are not only SEO issues; they are also development and architecture issues.
A technically weak website does not only rank poorly; it reflects poorly on the institution it represents. This guide covers five important foundations:
- Modern WordPress block theme architecture
- Core Web Vitals and performance optimisation
- Structured data for better search understanding
- Open Graph and social meta tags
- Technical site hygiene
Why Technical SEO Should Start During WordPress Development
A common mistake is to build a WordPress site first and ‘do SEO later.’ This approach often creates avoidable problems. By the time the SEO team begins work, the site may already have:
- A bloated theme with excessive markup and unnecessary CSS
- Too many plugins loading scripts and styles globally
- Slow-loading homepage sections with large uncompressed images
- Poor heading hierarchy that confuses users and crawlers
- Layout shifts on mobile devices and missing schema markup
- JavaScript loaded on pages where it is not needed
Understanding Modern WordPress Block Themes
WordPress development has changed significantly with block themes and Full Site Editing. A block theme is built mainly using HTML templates and a theme configuration file, composed entirely of blocks editable through the Site Editor. A typical block theme structure:
seo-ready-theme/
├── style.css
├── theme.json
├── functions.php
├── templates/
│ ├── index.html ├── front-page.html
│ ├── page.html ├── single.html ├── archive.html
├── parts/
│ ├── header.html ├── footer.html
├── patterns/
│ ├── hero-section.php ├── call-to-action.php
└── assets/
└── css/ js/ images/ fonts/
Why theme.json Matters
The theme.json file gives the developer a controlled design system. Instead of allowing every page editor to manually choose random fonts, colours, and spacing, theme.json enforces consistency across the site.
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 3,
"settings": {
"layout": { "contentSize": "760px", "wideSize": "1180px" },
"color": {
"palette": [
{ "slug": "primary", "color": "#005ea8" },
{ "slug": "secondary", "color": "#f2f6fa" }
]
},
"typography": {
"fontFamilies": [
{ "fontFamily": "-apple-system, BlinkMacSystemFont, sans-serif",
"slug": "system-font" }
]
}
}
}
From an SEO and performance perspective, theme.json helps because pages remain visually consistent, layouts are easier to test, typography is controlled, and content teams are less likely to break structure.
WordPress Permalink Structure
Before writing a single template, configure the permalink structure. By default, WordPress generates URLs like https://www.example.ac.ug/?p=123 which give no indication of page content. The recommended setting is Post name:
WordPress Admin → Settings → Permalinks → Post name
Before: https://www.example.ac.ug/?p=123
After: https://www.example.ac.ug/research-data-management-services/
- Keep URLs short and descriptive; use lowercase letters and hyphens, not underscores
- Avoid dates in post URLs for evergreen content
- Never change URLs after indexing without setting up a 301 redirect
Core Web Vitals: The Performance Layer of Technical SEO
Core Web Vitals are Google’s metrics for measuring real-world user experience in three areas: loading performance, interactivity, and visual stability.
| Metric | What it measures | Good target |
| LCP – Largest Contentful Paint | How quickly the largest visible element loads | ≤ 2.5 seconds |
| INP – Interaction to Next Paint | How quickly the page responds to user interaction | < 200 ms |
| CLS – Cumulative Layout Shift | How visually stable the page is while loading | < 0.1 |
For WordPress developers, these metrics should be considered before launch, not after the site is already live.
Optimizing LCP on WordPress (Practical Improvements)
Largest Contentful Paint measures how quickly the largest visible element loads. Common WordPress causes of poor LCP include very large hero images, sliders loading multiple images above the fold, slow server response time, render-blocking CSS, lazy-loading the main above-the-fold image, and unoptimised fonts.
add_action('after_setup_theme', function () {
add_theme_support('post-thumbnails');
add_image_size('hero-large', 1600, 900, true);
add_image_size('content-card', 600, 400, true);
});
// Render hero with eager loading — not lazy
echo wp_get_attachment_image(
get_post_thumbnail_id(), 'hero-large', false,
[ 'loading' => 'eager', 'fetchpriority' => 'high',
'decoding' => 'async', 'class' => 'hero-image' ]
);
- Compress images before upload; use WebP or AVIF where supported
- Avoid large carousel sliders on the homepage
- Enable full-page caching and use a CDN where appropriate
- Keep the above-the-fold layout simple and reduce unnecessary CSS
Optimizing INP on WordPress
Interaction to Next Paint measures how responsive a page feels when a user clicks, taps, types, or interacts with it. In WordPress, poor INP is commonly caused by heavy page builders, too many plugins, large JavaScript bundles, chat widgets, popups, analytics scripts, and complex menus. A good practice is to load scripts only where they are needed.
function seo_ready_theme_assets() {
wp_enqueue_style(
'seo-ready-theme-style',
get_stylesheet_uri(),
[],
'1.0.0'
);
wp_enqueue_script(
'seo-ready-navigation',
get_template_directory_uri() . '/assets/js/navigation.js',
[],
'1.0.0',
['strategy' => 'defer', 'in_footer' => true]
);
if (is_page('contact')) {
wp_enqueue_script(
'seo-ready-contact-form',
get_template_directory_uri() . '/assets/js/contact-form.js',
[],
'1.0.0',
['strategy' => 'defer', 'in_footer' => true]
);
}
}
add_action('wp_enqueue_scripts', 'seo_ready_theme_assets');
Optimizing CLS on WordPress
Cumulative Layout Shift measures visual stability. Poor CLS occurs when images, banners, fonts, videos, or dynamic content shift the layout after the page has started loading.
# Reserve image dimensions:
<img
src="campus-library.webp"
width="1200"
height="800"
alt="Students accessing online library resources"
/>
# Reserve space for video embeds:
.video-wrapper {
aspect-ratio: 16 / 9;
width: 100%;
background: #f2f2f2;
}
.video-wrapper iframe {
width: 100%;
height: 100%;
border: 0;
}
Image Alt Text and SEO
Alt text plays an important role in both accessibility and SEO. Search engines cannot see images directly; they rely on alt text to understand what an image shows.
<!-- Good: descriptive, specific, contextually relevant -->
<img src="campus-library.webp" width="1200" height="800"
alt="Students accessing digital research resources at the university library" />
<!-- Poor: vague, missing, or keyword-stuffed -->
<img src="campus-library.webp" alt="image" />
<img src="campus-library.webp" alt="" />
- Describe what the image actually shows — be specific and relevant
- Keep descriptions concise, typically under 125 characters
- Do not begin with “image of” or “picture of”
- Leave alt text empty only for purely decorative images
- For staff portraits, include the person’s name and role
Open Graph and Social Meta Tags
Open Graph and Twitter Card tags control how a page looks when shared on social platforms such as LinkedIn, WhatsApp, Facebook, and X. Without these tags, platforms show a plain URL or pull unpredictable content — looking incomplete and unprofessional.
function seo_ready_social_meta() {
global $post;
if (is_singular()) {
$title = get_the_title($post);
$description = has_excerpt($post) ? get_the_excerpt($post)
: wp_trim_words(get_the_content(null, false, $post), 30);
$image = has_post_thumbnail($post)
? get_the_post_thumbnail_url($post, 'large')
: home_url('/wp-content/uploads/default-social-image.png');
$url = get_permalink($post);
} elseif (is_front_page()) {
$title = get_bloginfo('name') . ' — ' . get_bloginfo('description');
$image = home_url('/wp-content/uploads/default-social-image.png');
$url = home_url('/');
} else { return; }
?>
<meta property="og:title" content="<?= esc_attr($title) ?>" />
<meta property="og:image" content="<?= esc_url($image) ?>" />
<meta property="og:url" content="<?= esc_url($url) ?>" />
<meta property="og:type" content="<?= is_singular('post') ? 'article' : 'website' ?>" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="<?= esc_attr($title) ?>" />
<meta name="twitter:image" content="<?= esc_url($image) ?>" />
<?php
}
add_action('wp_head', 'seo_ready_social_meta');
- Always provide a default fallback image for pages without featured images
- The recommended Open Graph image size is 1200 × 630 pixels
- Descriptions should ideally be between 100 and 150 characters
- Test tags using the LinkedIn Post Inspector or Facebook Sharing Debugger
- If using Yoast or Rank Math, avoid duplicating Open Graph output
Testing Core Web Vitals Before Launch
Performance should be tested before the website goes live. Google PageSpeed Insights uses the 75th percentile — a page passes when the 75th percentiles for INP, LCP, and CLS are all rated Good.
Pre-launch audit commands
# Check response headers and redirects
curl -I https://www.example.ac.ug
curl -I http://www.example.ac.ug
# Check sitemap and robots.txt
curl -I https://www.example.ac.ug/sitemap_index.xml
curl https://www.example.ac.ug/robots.txt
A well-configured robots.txt for WordPress:
User-agent: *
Allow: /wp-content/uploads/
Disallow: /wp-admin/
Disallow: /wp-login.php
Disallow: /wp-json/
Disallow: /?s=
Disallow: /search/
Disallow: /tag/
Disallow: /page/
Disallow: /*?replytocom=
Sitemap: https://www.example.ac.ug/sitemap_index.xml
SEO-Ready WordPress Launch Checklist
WordPress Build
- Lightweight block theme or well-optimised custom theme
- Clean template hierarchy with reusable header and footer parts
- Controlled design system in theme.json
- Permalink structure set to Post name
- Unused themes and plugins removed
Performance
- Hero image optimised; not incorrectly lazy-loaded
- Images use correct dimensions, alt text, and WebP/AVIF format
- JavaScript deferred; plugin assets loaded only where needed
- Page caching enabled and CDN configured where appropriate
- Mobile performance tested
Core Web Vitals
- LCP below 2.5 seconds where possible
- INP below 200 milliseconds where possible
- CLS below 0.1 — layout shifts fixed
- Forms and menus tested; PageSpeed Insights reviewed
Technical SEO
- XML sitemap enabled and robots.txt correctly configured
- Canonical URLs and HTTPS enforced
- Metadata, heading structure, and internal links reviewed
- Broken links checked; staging URLs removed
- Search Console connected; permalink structure confirmed
Social and Open Graph
og:title, og:description, og:image set for all key pages
Default fallback social image uploaded at 1200 × 630 px
Twitter Card tags configured
Open Graph tested with LinkedIn Post Inspector; no duplicate tags
Common Problems and Fixes
| Problem | Likely Cause | Fix |
| Homepage loads slowly | Large hero image or slider | Replace slider with one optimised hero image |
| Poor INP score | Too much JavaScript | Remove unused plugins and defer non-critical scripts |
| High CLS | Images without reserved space | Add dimensions and aspect-ratio containers |
| Schema errors | Missing required properties | Test with Rich Results Test and fix fields |
| Pages not indexed | Blocked by robots.txt or noindex | Review robots.txt and meta robots settings |
| Mobile layout breaks | Desktop-only testing | Test templates on real mobile devices |
| Social sharing shows wrong image | Missing or wrong-size og:image | Add og:image at 1200 × 630 px |
| Duplicate content warnings | Multiple URL variants | Implement canonical tags and enforce HTTPS redirects |
| Images not contributing to SEO | Empty or missing alt text | Add descriptive alt text to all meaningful images |
Conclusion
Building an SEO-ready WordPress site requires more than installing an SEO plugin after launch. It requires developers to consider performance, structure, crawlability, metadata, social sharing, and maintainability from the outset.
Modern WordPress block themes provide a strong foundation. With theme.json, reusable templates, clean permalink structures, optimised assets, and disciplined content structure, developers create websites that are easier to maintain and better prepared for technical SEO. Core Web Vitals add another important layer by measuring how users experience the site. Structured data helps search engines understand content meaning. Open Graph tags ensure the site presents itself well across every platform.
Reference Links for Further Reading
https://developer.wordpress.org/themes/templates/
https://developers.google.com/search/docs/fundamentals/seo-starter-guide
https://developers.google.com/search/docs/appearance/core-web-vitals
https://developers.google.com/search/docs/appearance/structured-data
