WordPress theme not working on hosting server - wordpress

I recently built a custom theme for my WordPress site and it works perfectly on my localhost. However, when I uploaded it to my hosting server and activated it, I received an error message saying 'Template is missing. Standalone themes need to have a templates/index.html or index.php template file. Child themes need to have a Template header in the style.css stylesheet.' I've double checked and all of my theme files are properly uploaded and organized on the server. I've also checked the file and directory permissions and they seem to be set correctly. I'm not sure what the issue could be. Any ideas on what I should try to fix this issue? Any help is greatly appreciated.
screen short
I tried the following steps to fix the issue with my theme:
I backed up my site using a WordPress plugin to ensure that I had a copy of my site's files and data in case something went wrong.
I checked the file and directory permissions on my hosting server to make sure that all of the theme files were set to the correct permissions.
I reviewed the style.css and index.php files to see if there were any issues or mistakes that might be causing the problem.
I made sure that my theme was properly activated in the WordPress dashboard.
Despite these efforts, the issue persisted and my theme was still not displaying correctly on the live site. I was expecting the theme to display correctly and for all of its features to work as intended after activating it on the hosting server

Related

Wordpress website hacked and .htaccess file is creating automatically with strange code

In my wordpress website .htaccess has some strange redirection script, i removed the file but once the site is browsed the .htaccess file is automatically created with the strange script. in addition to that a folder named generall is also automatically creating even though we delete the folder. The folder has one php file and html file with strange scripts. Please help to resolve the hacking issue
You need to completely remove the infection from your site. Here's the easiest WordPress guide to follow: https://malcure.com/blog/security/the-easiest-guide-to-wordpress-malware-removal/
Your website still contains malware. You need to do a complete virus scan. You can use WordFence plugin to scan.
With these also try
1. Update all theme & plugins.
2. Do a manual update of your WordPress.

I changed my Wordpress theme folder. Now it's not finding my stylesheet after I changed it back

I hope this is a quick fix, but I've been searching for a solution and haven't found one.
Quick background:
I've been developing my Wordpress website locally using WAMP. I'm getting the site ready to deploy to a production server, and before deploying it I wanted to simply rename my theme folder from "naked-wordpress-master" to "My Portfolio" or something different.
First, I went to my theme folder and changed the name. I refreshed the Appearance > Themes page in the wp-admin site and got an error that the stylesheet could not be found.
I got a bit worried, so what I did next was rename the theme folder back to "naked-wordpress-master" and refresh the page. Same error.
I then tried deleting the theme from the wp-admin site and re-uploading it. I got an error the upload failed because the stylesheet couldn't be found.
FYI I'm using SCSS that outputs a style.min.css, but that shouldn't matter. I didn't change anything else from the header, functions.php, or stylesheet linking and it was all working just fine before.
Any ideas on what's going wrong and why my stlyesheet is failing to get recognized?
Thanks a bunch.
--Update--
I'm noticing my index.php loads fine, but sub-pages look like this
In your database find the "_options table (table prefix could be what ever you have set while installing wordpress). In options table, find the entries for "template" and "stylesheet" (both are different entries) and check their corresponding values. If that is not your theme name, change it manually to your theme name.
Also, make sure your theme has style.css at its root location. That's a technical requirement for enabling the theme.
After Update
Seems like its a rewrite issue. Check if the .htaccess file exists.
If it doesn't, in admin are, go to settings->permalinks, change the permalinks settings to something different, save the settings and revert back to what ever you had set before. (Ideally you should select the "post name" setting, which generates pretty permalinks which are also SEO friendly)
This will flush the permalink rules and also create the .htaccess file if its missing.
Hope this helps.

Wordpress site went down after deleting a plugin via ftp

I wanted to update the Revolution Slider plugin so I just went in via FTP, deleted the folder and added the new plugin folder. When I went to the site I got a very basic 500 error with not much info (in Chrome).
I tried removing the plugin, replacing it with the original, removing the htaccess file, putting in a blank htaccess file but nothing seems to bring the site back up.
I now have the original revolution slider plugin installed and the htaccess file with the rewrite rules (basically as it was when the site was working last).
I am at a loss for what to do next. Any suggestions? Here is the site location:
http://innerwestadv.com/damonte/
I actually had to go into the database and deactivate all of the plugins.
http://www.wpbeginner.com/plugins/how-to-deactivate-all-plugins-when-not-able-to-access-wp-admin/

Wordpress Theme fails on transfer to live site

I have a live site using WordPress. I created a test folder on this site to develop a WordPress theme. However when I copy over the theme folder from the test to the live sites theme folder and activate this new theme I get issues. All that shows is the title of the site. The version is the same 3.3.1. Has anyone come across this? What can I do to make this work?
My guess is there's a PHP error due to something in effect on the live environment that is stopping processing of the theme files.
You might try adding this code at the top of your header.php theme file. If it is a PHP error, this ought to force your server to display the error and line number:
<?php
ini_set('display_errors',1);
error_reporting(E_ALL);

WordPress not recognizing theme in /themes/ folder

Having a really baffling issue with permissions, WordPress and theme files.
I have a fresh install of WordPress and tried uploading the theme I made for my client. It uploaded fine but it doesn't show up in the Manage Themes menu. I checked everything was uploaded and it was. Checked permissions (even set them to 777 at one point) and they were fine. But the theme doesn't show up.
Here are the different scenarios I've tried:
Using the Install Themes menu and uploading a .zip (failed)
Duplicate twentyten folder and contents (worked)
Duplicate twentyten folder and used my theme files (failed)
Duplicate twentyten folder and used my theme files and their style.css (failed)
Uploaded my theme WITHOUT style.css (gave missing style.css error)
Uploaded my theme WITHOUT style.css and put in twentyten/created one from scratch (both failed)
I'm on my clients MediaTemple hosting and I've never encountered this error. Their support has yet to get back to us.
Does anyone have a similar problem? Solution? It's possible I can give you FTP access if needed.
CSS Head (changed values but format and everything is still the same):
/*
Theme Name: Example Theme
Theme URI: http://example.com/
Description: WordPress theme
Author: Company
Version: 1.0
*/
Edit: Trying to access the folder through my browser results in a 403 error (works fine on twentyten). style.css can be viewed from the browser.
If you are using a MULTI-SITE installation of Wordpress, you have to first go into Network Admin, select Themes from the left menu and enable the themes you like to use before they can appear on the "Manage Themes" page in the Site Admin section.
Perhaps you are missing a required template file?
At the very minimum, a WordPress Theme
consists of two files:
style.css
index.php
http://codex.wordpress.org/Theme_Development
On Ubuntu 14.04 you can install the wordpress package simply using sudo apt install wordpress but then you have to set a link to the themes directory.
E.g. for your "newTheme":
ln -s /usr/share/wordpress/wp-content/themes/newTheme /var/lib/wordpress/wp-content/themes
I bet you have some special characters in your templates. This once drove me nuts to find.
Check your Template files and/or rename them until the theme shows up. I used a german "ö" in a templates name.
I had a very similar problem. Spent a few hours before I found that somehow when I moved my local site (probably using All-in-one Wp Migration plugin), a .htaccess file was created in the /wp-content folder. I don't remember what was inside this file but I think it didn't matter.
After removing this file everything was ok.
Is the theme folder name different than everything else? Is the Theme Name in style.css different than everything else?
I am guessing BOMs are the problem. They messed up my validation of a page once, as I tried to remove the BOM. Try using an editor and remove the BOMs. For Notepad++, the text editor I use, I just set the encoding to UTF-8 without BOM and saved. That solved my problem. Of course, your text editor may be different.
As I discovered at the end of tortuous troubleshooting, an old wp-config.php may cause newly installed themes to be undetected and invisible in /wp-admin/themes.php - I am not sure that you have the exact same problem but it looks very similar to mine and you might want to try your configuration with a wp-config.php newly generated by Wordpress.
Make a backup of your styles.css
Copy the styles.css file from twentyforteen to your theme folder.
Only change the template name at the top of the file
Re-load the themes page in WordPress admin; once you've seen it working,
Further-modify the new styles.css file as needed.
The problem could have been, that you uploaded it in .zip
Your php setting might disable the scandir. It may cause the wordpress cannot scan the theme folder
Solution:
find php.ini. You may run php --ini to get the php.ini file location.
Open php.ini,Search for disable_functions, then you may removescandir parameter.
Save and restart your php services.

Resources