Prevent Search Engines from Indexing WordPress Blog - wordpress

that might seems like an easy question but I'm struggling on this problem since monday.
There's a wordpress website that I need to be hidden when searching for the keywords contained in it, but I can't work it out.
I already tryied to:
Add a robots.txt, on the main root, on the httdocs folder, and on the folder containing the website.
Use the in-built function of wordpress.
Protect the website with a password
None of them seems to be working, so I deleted the website (that was a staging website btw) but it keeps being indexed on search engines.
What shall I do?

Robots.txt is the solution. However you need to realize it can take weeks for google remove the site from index.
For other options see "Make removal permanent" part - https://support.google.com/webmasters/answer/1663419?hl=en

Related

Wordpress uses backed-up theme files instead of customized file. (solved by myself // little how-to)

I just wrote a long and detailed question and when I was about to submit it, I fixed the problem by myself. The problem did cost me about 5 hours and now I will just post this little explanation, so maybe it helps others and they will not feel as stupid as I do right now.
In my defense: I do not have that much experience with this system.
What was the Problem? When did it show up?
Before I change a file on the server, I always duplicate it and change the file name to originalFileName_yyyymmdd_hhmm.php (filename + date + time). I want to keep track of the changes, and when we launch the website, I wanted to do a local backup and then delete them from the server.
Let's say, in the folder of the active theme there is a file called home.php.
It is a template file, which means that you can select it as a template for a page when editing it in the backend of WordPress.
I duplicated it and called the new file home_20180301_2300.php.
Then I edited the home.php, but the changes were not displayed on the website.
I checked for any known cache issue, but that was not the problem. So I installed a debugging plugin (Template Debugger) to see which files are used by the server to create the website.
Wordpress used the home_20180301_2300.php instead of the home.php and I did not know why. When I deleted home_20180301_2300.php WordPress did NOT use home.php It just took the standard template instead.
What I think what happened
In the last moment before submitting this question I realized what happened:
In the process of working, there was a situation where I deleted the home.php and then edited the page in the backend. WordPress could not find the home.php, which was set as the template for this page. BUT it found home_20180301_2300.php and used it. (Because WordPress is smart [sometimes {not a joke}]). When home.php was back in its place, WordPress did not care. It looks like as long as there is no problem, WordPress does not search for other (or newer, or better suiting) files. It still used home_20180301_2300.php, because it worked. That's why my changes in home.php did not have any effect. home.php was ignored.
The Solution
I had to delete home_20180301_2300.php, open the page in edit mode and select home.php as the template again. WordPress did not find home_20180301_2300.php, "BUT HEY! There is home.php, my old friend, so I can use it", WordPress said and they happily lived together for the rest of their time.
Feel free to comment!
I am sure my explanation is quite simple and not showing the whole picture. If anyone knows better, I would be glad to hear it. Better knowledge of the problem and the way WordPress works can help me and others to better understand future issues.
Peace out,
Nils

Wordpress Migration issue css

I have migrated website to new domain, the problem is css not loading
if I inspect element it gives link to old domain, is there a way to update css links in wordpress?
please help
When moving a WordPress site to a new domain, you need to change the Site URL and Home URL, usually in the database or in wp-config.php, depending on how the site was originally set up. There may be other changes you need to make in the database, or by manually editing posts, like the locations of images in posts.
This page on wordpress.org is a good reference, for all the things you may need to change, and it shows a few different methods to make most of the changes, so you can choose the one you prefer:
https://codex.wordpress.org/Changing_The_Site_URL
Make sure to keep a backup of the site in case of any mistakes. If you make some changes, and most of the site is working, but a few things aren't, I would recommend making another backup, so you could restore it again without losing much work, if needed.
yes when you are adding links to your site you show use the function site_url().example/my_post in order to construct the links

Font awesome icons not showing in Wordpress after site address URL change

This may be an obvious question for those of you more advanced in coding than myself...but I created a website in WordPress but their domain is hosted elsewhere. They changed the A name and it now points to the site, but the font awesome icons are now square boxes. How can I fix this? Is there a simple way?
Many thanks for any help/guidance.
Alison
Super late, but hopefully this saves someone a lot of time. After migrating an existing Wordpress site to a new domain, I too encountered icons missing (both on the front-end and the back-end administration). After a long search and applying different methods, I found the database still listed the original/old domain within the "option" table.
Using phpMyAdmin, select the "option" table. Within "option" you will see the "site" and "home" rows. If the value has the old domains, you will need to change it to match the sites URLs (Located on the Administration dashboard under Settings > WordPress Address (URL) & Site Address (URL). To change the value, click Edit > and update the URL.
Fix the problem in less then 2 mins. Simple replacement of /font-awesome/5.13.0/css/fontawesome.min.css with /font-awesome/5.13.0/css/all.min.css and also font-awesome/5.13.0/js/fontawesome.min.js with /font-awesome/5.13.0/js/all.min.js can fix this issue. https://youtu.be/_GV_pEmLCLU
I know this is 2 years old, but I just ran into a similar problem and the answer given by Owais did not feel right to me (getting CSS from another site).
This happened to me for the exact same reason as it did for OP. I migrated my website to another host and another domain-name. After doing that I ran a rename-script for the DB (thousants of hard-coded URLs were replaced).
However, as it turns out, my theme was also using hard-coded URLs in the CSS files and in some JS files, as they were generated (upload/fusion-scripts and upload/fusion-styles). After replacing the hardcoded URLs in these files (I used visual studio, but you can use any bulk-replace tool) everything worked fine again.
Just another idea to throw in here - after transferring the site to the new server, and running this handy script to replace all references of the old url with the new one, I was still having the same issue with font awesome. The solution was to go to Settings / General and set the Endurance Cache to Off (0). Refreshed the site and all was well.
In my case, I had that problem changing the url using the constants WP_HOME WP_SITEURL at wp-config.php
When I changed through the wp-admin using the RELOCATE flag, worked
As you may know, this is the official doc about it
I had this problem so many times but this time I found the full proof solution for this issue:
Open PhpMyAdmin and then click on wp_options table.
In this, you will see a table with a name(according to your theme name) something like "theme_options_css" edit it and change the URL from old to new.
The problem might occur due to Http to Https migration also. So for that also change Http to Https manually in the same table and the problem will be resolved the moment you save your table.

Dnn 2sxc Blog Module sub-directory

I am testing out DNN 8 and am using the blog app and content management from 2sxc (great module, BTW!).
I have the recent blog post listed on a page sub-directory called '/articles'. But I also wanted some of them listed on the home page as well. When I add the app or module to the home page the url is '/home/post/post-title-here' while on the /articles page the urls are '/articles/post/post-title-here'. This creates the illusion that I have two directories with duplicate blog posts (which probably will get me some dings for SEO for duplicating the same content).
How do I get the app to use the common directory '/articles' regardless of where I put the module/app on the site? I've looked at settings all over and don't see anything that pops out at me. Also not sure if this is a DNN setting or a setting specifically to the extension. Finally, I'd like to be able to keep the year/date/month parts of my url as well as they were on the old site. I assume making that change would probably be similar with the solution to my original question. If that's a different fix, then let me know and I'll put it into a new thread. Thanks in advance!
This question is basically about the blog-app. Now if I understand you correctly, your question is "Can I have multiple lists on various pages, but all of them still link to my main details page". The answer is yes, but the exact solution depends a bit on what you need.
So basically there is a setting in the app-settings to define the main page. I believe it's empty by default, so that the blog-app works automatically without you having to configure anything. But AFAIK if you set that, all blog-details-links will use that as the only source.

Change URL NextGEN Gallery Plugin

We are using the NextGen Gallery plugin to generate a slideshow in a Wordpress site. I needed to change the site URL to a a different subdomain, and this seems to have broken the links. The plugin-generated javascript still passes the old URL to swfobject.embedSWF.
Does anyone know how to fix this? I already updated the Wordpress "General Settings" with the new WordPress address and Site address (which are the same), and the plugin does not seem to pick up that change. Thanks!
Found it. It's in the string-encoded ngg_options entry in the wp_options table. The specific field is "irURL".
Why they chose to capture the site URL independently, instead of reading it from the Wordpress site configuration, is beyond me.
Could it be that NextGen has hardcoded those values somewhere in its database tables?
It could be a matter of running a bunch of SQL update queries to replace any instances of http://old.domain for http://new.domain
And now I'll state the obvious, recommending you to backup the full DB before you attempt any of this.
I had the same problem (unchanged absolute CSS/JS files' paths) after domain changing although I changed every single old domain's occurrence in database (even in serialized arrays/objects in options).
I found solution on http://www.nextgen-gallery.com/galleries-opening-lightbox/ - I didn't have time to do an investigation where they store these paths or in which format. :P
For me it is extremely stupid in Wordpress that it stores absolute paths (with one and the same domain) in so many places but that's another matter. :)

Resources