Can't control Wordpress Addresses from admin panel - wordpress

Good Morning,
I have already created several sites in WordPress and I have always been able to manage the link of my site with or without https and with or without www through the settings in options > general, as you can see here: https://prnt.sc/lzv62u
Lately, I have to use a plugin to force https and I've even added code to the htaccess file to redirect to "non-www". However, this htaccess file loses those changes that I make very often (I do not know why).
I would like to know, first of all, if it is possible to manage this type of settings again through the admin panel of my WordPress. If it is not possible, I would like to know why and what is different for this particular site cannot control these settings in the admin panel (because I have already managed to do so in others).
Secondly, if this is not possible, I would like a permanent solution to redirect from www.floresnocais.pt to floresnocais.pt since I already have a plugin to force https.
Thank you

Set the .htaccess rights to 400 after applying all the required changes to the file. This will make the file read-only and prevent any further changes.
We faced the same issue in the past while using the WPML and the events manager plugin. There were issues in preserving the permalinks. The issue may be due to multiple plugins have the write access to .htaccess file and one is overwriting changes of the another.

Related

Why my Wordpress website is showing nothing?

My Wordpress is only showing me the following in the picture "My First Heading" and "My First paragraph". I tried to add themes and customise it but it is not changing. Also, I have added another page and I made it as homepage of the website, but still it does not work. Besides I reset my whole website and nothing happened.
I do not have enough points to put a comment, so I will post here. It is not possible to give a straight-forward answer to this, since there may be many reasons why this is showing. Here are some general tips that may help:
Check via ftp if your root directory contains any index.html files. If yes, remove them. WordPress uses index.php to load.
Go to WP Admin and switch off all plugins.
Turn on the default WordPress theme (Twenty Twenty or Twenty One, depending on your WordPress version)
Contact your host (send a ticket)
If none of this work, create a full site backup, then reinstall WordPress (make sure there are no other files on your server that can mess with the installation)

how do i prevent hotlinking of images in my wordpress site?

I have a wordpress website hosted on byethost.com which runs on a free account, now what the problem is that on some computers it shows that image hotlinking is disabled on my plan, is there a way to change my urls of images whithout giving my websites link, or i'll just have to upgrade my plan??
You should add an entry to your .htaccess. This page has a handy generator that will write he rules for you.
As always with making changes to .htaccess, make sure you back it up first, and don't put it in between the comments added by WP, since they may get over written

wordpress theme doesn't appear

I'm having a very basic problem: I'm trying to create a new theme for a wordpress installation locally on my computer.
I've created a styles.css and index.php file and put it in a folder in wp-content/themes. But it doesn't appear in the Wordpress themes page.
As a test, I made a change to the description of one of the existing themes (Twenty-Ten) in its style.css, and refresh the Wordpress themes page, but the old description continues to be shown. This suggests to me that I'm simply using the wrong folder, but that's not possible! Any ideas on this problem much appreciated.
UPDATE: In fact, even when I delete Twenty Ten from the Themes folder, it's still available as an option in the Wordpress backend, and I can activate it... Very strange...
G
I agree with your diagnosis. You are either looking at the wrong folder or in fact the wrong computer. There's no other way that you could change the theme to one that has been deleted.
I suggest that you confirm you are in the same universe you think you are in. Create a simple file localserver.txt in your WordPress directory and then confirm that you can access that file.
If you can't, you have your answer. You are somehow accessing a different location.
If you can access that text file, you need to go further and look to see if something like the site url setting is redirecting you to the live site, without you realizing it, when you access wp-admin.
Beyond that, I'd need to know more about your setup. Something like having www.example.com in your /etc/host file and not example.com can cause similar confusion...
Are you using Wordpress Multisite?
In that case you have to 'enable' that theme in the Network admin manager

Two domains on same WP site, but different header

I'm using Wordpress for a client's website and this client asked me if he could have two domains with the same content, but a different logo on top of the page. So for example:
www.website1.com with logo1
www.website2.com with logo2
Both with same theme & contents.
I was thinking of a double WP install, but then you have to do every change two times. I read something about multisites in Wordpress, but could not find out how to do this.
I hope someone can help me out, thanks!
On the SEO front this is a bad idea, you will duplicate all content Google won't know what to value more. But if you really want it.
you could do this with two wp install's but there are problems.
First set your site url's in the wp-config
Second let both installs connect to the same database. The change in
header can be detected with $_REQUEST (google it)
Now there are 2 problems left which I don't know how to fix.
The uploads folder need to be synchronized so each site can access the uploads
the solution will be with simlinks stuff. (which I'm not familiar with)
And your hosting provider has to allow it.
If you add an internal link in your post/pages it will prepend the complete site url, and save this hard coded in the database.
The solution of this could be in the editor, of to filter the content before it is printed.
If you want to go this way I'm willing to look further into these problems
Here is a relatively recent article on how to set a multisite wordpress network up.

WordPress with Yahoo! Hosting... Almost there

EDIT:
Yeah, so this problem is really unsolvable. Yahoo prevents access to .htaccess, even from WordPress itself trying to change it. I had to settle for writing a script on the default homepage that redirects browsers to "www.abc.com/index.php" if they go straight to "www.abc.com". You always have to deal with "index.php" being in the address bar but it's better than not having permalinks...
/EDIT
Yahoo! Small Business hosting seems specifically engineered to make WordPress difficult-- but it's my client's host and there's not much I can do about it. I'm trying to move WordPress into the root directory, and I'm sooo close to having it done.
I've read and read and read about how to get the Permalinks to work right, and since Yahoo! hosting doesn't let you modify htaccess I am pretty much up s*** creek. I'm using the simple permalink structure of "/%postname%/", which once I moved to the root, stopped working. I have changed it to "/index.php/%postname%/", which allows you to see the pages if you manually type in index.php before the page name or if you are logged into the admin area and "View Page". Also, the correct permalink shows on all of the pages in the editor.
However, WordPress doesn't let you change the permalink of the static page you use as the front page.
Long story short, if I go to "www.abc.com/index.php", the links in the menu all work fine. However, if I just got to "www.abc.com", the links don't pick up the "index.php" from the permalink structure. I need to fix this, so if anyone knows how to either:
Change the permalink of the static front page
Fix something in the database if I install PhpMyAdmin
Work around not having access to .htaccess
Put a small script somewhere on the index page to append "index.php" to the url
Any other suggestions
It seems it would work if I was NOT using a static front page but rather the blog, but this isn't an option. I've tried changing the "Tag base" setting to no avail, as well as deactivating the Yahoo! Custom Permalinks plugin (and reactivating it again after that failed...). Could really use some help!
Check out Giving Wordpress its own directory. I can see how this could solve your problem. Also make sure that you have done the obvious, and change your url for WordPress address (URL) Site address (URL) inside the general settings page. Perhaps the static homepage should be developed outside of wordpress, and then you can follow the steps provided in the link I provided. Hope this solves your issue.
Yahoo doesn't allow users access to the htaccess file which means that you can't the mod_rewrite rules needed for custom permlinks. The Only way around it that i've heard it works (never tried it myself) is to add /index.php/ to the beginning of your custom structure so: Go to Permalink Settings > Select Custom Structure. And set the value as /index.php/%postname%/ or what ever you want as long as you add /index.php/ before it.
Hope this helps.
I had a similar problem with this host (in 2018! 4 years after your question) that I finally solved by changing the permalink settings.
Settings > Permalink Settings > Custom Structure: /index.php/%postname%/
I wish there was a better solution but Yahoo Small Business still doesn't allow .htaccess files - after several frustrating rounds with customer service, I finally admitted defeat and used this work around.

Resources