简体   繁体   中英

Custom CSS WordPress Theme via cPanel (not updating)

I am wondering why I am not unable to make changes; I already tried several things yet, I don't seem to be able to update the CSS, the following I did already:

  1. There is no Editor, so I am unable to make changes via there.
  2. I am an Administrator and have access to cPanel.
  3. I made changes via ../wp-content/theme/my-theme/style.css and no changes were made.
  4. I empty my cache via plugin and hard reload my Chrome, Firefox and Safari. And no changes were made.

Is there any other solutions? I already found the file which contains all the styles. I would try to add my own class, and see if I am to see if there is any effect.

Please check following options

  1. Permission of file at ../wp-content/theme/my-theme/style.css.
  2. Grab the css and open in Dream-viewer or sublime is there any css syntax issue.
  3. Also the path of style.css in header is show same by view source.

Or

Even you can use the plugins which allow to add custom css without toching the server check this plugin https://wordpress.org/plugins/simple-custom-css/

First thing first, From cPanel you can navigate to your website from the fileManager, use it to make code changes and then save them. You need to clear the cache everytime you make changes (i usually do it from the browser (in chrome, open the dev console, then long press on the refresh button and select the bottom one)

If the changes are still not showing on your site, I think that maybe you are editing the wrong CSS? Is this your theme and are you 100% sure you are editing the right file and, for example, it's not overwritten by a child theme or something else?

If you are using any framework, maybe your property is overwritten by your framework (for example, by bootstrap). To check this, open the console or try to add !important in your CSS file.

Just as an example, when I develop a theme I leave the root style.css with only the theme definitions, and then I create different stylesheets in a different folder. This leads me to the next question: are you enqueue your file correctly? is it even loaded by WordPress?

to check this I usually inspect the code in and search for the id of the file I enqueued from my functions.php.

Unfortunately, without more details, this is the only things I could think of when developing and WordPress theme and make changes from cPanel. Hope some of this can actually help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM