WordPress not recognizing theme in /themes/ folder - wordpress

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.

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.

how to view and edit a wordpress php file locally (MAMP)

I am helping out creating a few wordpress templates. I've been sent over the basic content (wp-admin/wp-content/wp-includes folders and other wp-* files).
They've already created a new theme, and one front-page.php file. This file includes "parts" such as get_header and get_footer.
Essentially now they'd like me to create new templates using this theme, and php variables to make updating easier. My question is - how can I view this so I can see what i'm making?
I downloaded MAMP and set up a local server, and if I create a sample .php file in the htdocs folder, that page appears correctly. However when I paste the Wordpress folder that I was sent, nothing loads. Is there a special way to get a front-page.php including partials to load within a theme? Am I missing something obvious here?
You will have to Install WordPress completely in order to make it work. Then you will be able to add your folder in the "Themes" folder of WordPress..
You can Google "How to Install WordPress on Mamp" for more info... you will find plenty of websites helping you.
I also suggest you read a few blog post on how to create WordPress Themes... :)
Good luck

Upload theme button don't work in wordpress

I have installed Wordpress in my Godaddy hosting.Its working quite well except i cant upload a new theme. when i click Appearance > Themes and then add new nothing shows up. The only thing that shows up are the buttons featured , most popular etc but when i click them nothing happens. When i press the upload theme button nothing happens either. How do i fix this?
I have tried it switching the default theme, deactivating all plugin but nothing resolver the problem. Godaddy support says that i will get a conformatin mail after the installation process completed within 24hours. Its almost 24hours but i haven't got any conformation mail. What can i do?? Do i really need to wait for the conformation. i can visit my blog but cant upload any theme, whats going wrong??
You can add your theme directly in your Wordpress installation. For this go to public-html/wp-content/themes/ and drop your theme folder here. Remember that your theme files must not be in subfolders of the folder e.g. /themes/your-theme/theme-files-and-folders/
Had the same issue today and solved it using these steps:
Download the Theme .zip file to your machine.
In cPanel File Manager, navigate to your Themes folder. Depending on your hosting, path to Themes folder can differ a bit but essentially you are looking for public_html inside which you’ll find /wp-content/themes/.
Once you’re inside the Themes folder in cPanel File Manager, click on Upload and upload that .zip file you saved in Step 1.
Once the .zip file is uploaded, right click on the name of that file in cPanel and select Extract from the context menu.
Now you can refresh the WordPress themes page and you should be able to Activate it.
The issue was theme related. I just renamed my current theme and then the default theme was automatically activated. Then i was able to upload my zerif lite theme and its now working fine.
I have been through this issue and i have solved it!
it happens mainly when yu transfer wordpress database from another location!
Solution:
UNinstall and deactivate all themes! delete and re install! if you cant delete the theme due to modifications, decativate the theme switch to another new theme by installing from wordpress and then reverting back to old theme!
if the problem persists: Reset server!

Wordpress - no themes

I have installed a fresh copy of wordpress on a windows XAMPP server. I configured the wp-config file and ran the install script. All is ok, and I am able to view my new wordpress site and login to admin area.
However - when I go to Appearance->themes - the current theme is set to TwentyTwelve and in the lower section the "Available Themes" does not show ANY themes.
After this I copied a new theme to the themes folder (which was working on a WP install on my test server at work) and that doesn't show up either.
Can anyone tell me how to make the other default theme (TwentyEleven) and more importantly my own built themes, appear as being available?
Thanks :)
Try to change the theme folder permissions to 777
style.css is very important for a theme.
You should check either style.css exists or not.
If No, try install wordpress again.
If Yes, then there might be the issue of File Permissions.
Set file permissions from below.
http://codex.wordpress.org/Changing_File_Permissions

Resources