A well coded WordPress theme usually work like a charm. There are many reasons why some bloggers having WordPress theme display issues. For example:
- They uploaded the theme into the wrong location
- Some PHP extensions are missing
- PHP version too old
- Scripts conflict
- Bloggers are too new in WordPress
This guide, we will show you the right method to upload a WordPress theme, activate WordPress theme and how to fix WordPress theme not displaying correctly.
Before we proceed, let’s have a look on WordPress theme hierarchy first.
From the above side by side theme hierarchy comparison, all themes, they will have the following template files.
- index.php : for homepage layout
- achieve : for post category layout
- comment.php : for comment section
- header.php : for header display
- footer.php : for footer layout
- functions.php : most of the hook, developer place here
- page.php : for pages layout
- search.php : for search result page layout
- searchform.php : for search form display
- single.php : for blog post ( post custom post type ) layout
- style.css : all the basic css developer will put there
- screenshot.png : to display the screenshot of the theme in /wp-admin/themes.php
- readme.txt : to display the license usage, theme version, theme changelog and faq
Please ensure you protect the header.php and footer.php. Attackers usually will hijack either these files to insert funny code.
How to upload a new WordPress theme
You have 3 options to upload WordPress theme.
1. Upload WordPress theme in cpanel file manager
Login to yourdomain/cpanel, under the files accordion, you will see the file manager icon.
Then click on the public_html folder, wp-content folder. You will see a few folders such as plugins, themes, upgrade, uploads. If you are using caching plugin, cache folder will be there too.
Click on themes folder, then you can upload the WordPress theme zip file. After the uploading process completed, click on the extract link at top right.
After you see your new WordPress theme folder, the last step is delete the theme zip file you uploaded just now.
2. Upload WordPress theme in WordPress admin dashboard
Type yourdomain/wp-admin/themes.php into your browser, you will see the “add new” link. Then click the upload theme and proceed from there. The whole process will only take 30 seconds max.
3. Upload WordPress theme via ftp
You have to download ftp client such as filezilla. After you install filezilla, you have to add new site. Host, please put your website server ip or ftp.yourdomain.
The user and password info are in your welcome email. The port, leave it blank. Encryption, please choose use explicit FTP over TLS if available.
After you login, you will see many folders such as ssl, tmp, www, mail, logs … please click the public_html, then wp-content > themes.
Right click, create directory. The directory name must be the same as your theme zip file name. Then upload all files and folder of your new WordPress theme into the directory you created just now.
How to check PHP extension in cpanel
Login to your cpanel, then click select PHP version.
Click extensions and double check you have the latest PHP version there. Currently some hosting provider already installed PHP 8. Serverfreak did a great job and provided the php performance benchmarking results
Please make sure all PHP extensions required are tick. You can check the theme requirement in readme.txt file.
How to check PHP version in cpanel
Same as above. Login into your cpanel, after you click the select PHP version icon, the current PHP version will show. If you host multiple domains into a single shared hosting or cloud hosting, click on my domains. You can set different PHP version per domain.
How to check is it have any scripts conflict with my WordPress theme?
The easy way to do this is turn on debug mode in wp-config.php
Change the following code
define( 'WP_DEBUG', false );
define( 'WP_DEBUG', true );
Then refresh your page. If have any conflict, the code will show. After you troubleshoot wordpress theme not displaying issue, remember to turn off debug mode.
1. WordPress theme not displaying like demo
Most premium themes, for example betheme, you can preview all demo in WordPress dashboard before import the demo content but some demo are build together with other required plugins. If the required plugins not activated, the demo layout will not display properly.
None paid themes, the demo data you can import via Tools > Import > WordPress
2. WordPress theme not displaying images
a) Image lazy loading issues
To solve this, please turn off lazy load image of any speed optimization plugins you are using. WordPress version 5.5 already have lazy load image by default.
If you prefer to use the lazy load image function of your chosen plugin, you can disable WordPress 5.5 lazy load using the below snippet. Paste this line into your functions.php
add_filter( 'wp_lazy_loading_enabled', '__return_false' );
b) Demo images are copyrighted
6 Creative Commons licenses
- Attribution CC BY
- Attribution ShareAlike CC BY-SA
- Attribution-NoDerivs CC BY-ND
- Attribution-NonCommercial CC BY-NC
- Attribution-NonCommercial-ShareAlike CC BY-NC-SA
- Attribution-NonCommercial-NoDerivs CC BY-NC-ND
Some license, theme authors are not allow to share the stock images.
3. WordPress theme activated but not showing
The common cause is insufficient memory. Please insert the following code into your wp-config.php
If your host offering you only 512MB of ram, please change the above 1024M to 512M
Max execution time too low may also cause WordPress theme not showing. Put the following code into your .htaccess
php_value max_execution_time 180
How to check max execution time in cpanel?
Login into cpanel, then click select PHP version > options
Some themes required min PHP Time Limit 120
Another common issue that may cause the theme not showing properly is PHP Max Input Vars. You can use the following code into .htaccess
php_value max_input_vars 8000
4. WordPress theme not working after migration
Login to your admin dashboard, Settings > Permalinks, click save again. Sometimes migration plugin fail to transfer your .htaccess.
If still fail, try paste the below into wp-config.php
update_option('siteurl','your domain here'); update_option('home','your domain here');
5. WordPress theme homepage not showing
Login to your dashboard, Settings > Reading, tick a static page and choose your homepage.
If your homepage displays wordpress not showing, please go to Appearance > Customize and choose your homepage from there. Some themes, they did it this way.
For example, the fastest WordPress theme, GeneratePress, the free version you can only display blog posts in homepage and the paid version, the sky is the limit.
6. WordPress theme not changing
Please purge cache or re-activating your caching plugin. Caching is the common cause why WordPress theme not changing.
Another reason is your browser cache. Clear cache and cookies, revisit your website.
You can also use use incognito mode if you don’t want to purge cache.
7. WordPress theme pages not showing
Check your theme is it have page.php
This is a required file to show the page post type content.
Another reason is white screen of death. You have to increase the memory limit of your site. Please follow our instruction above to increase your website memory to at least 512MB
8. WordPress theme preview not working
The most common cause of a WordPress theme not previewing in Appearance > Customize is your WordPress version out of date. Please update immediately.
If your website already use the latest WordPress version and still having issue in theme preview, we recommend the following.
- Clear your browser cache. You might be still loading the cache version of your website
- Restart your computer. Sometimes your computer already out of memory and this will cause the theme fail to preview
- Turn on debug mode in wp-config and refresh the page. If have any plugin output conflict scripts, the error will show. Turn off that plugin