chown: invalid user: `www-data?www-data’

When updating wordpress, I got the following error message: chown: invalid user: `www-data?www-data’ Run the following linux command: chown www:www -R /home/wwwroot/

How to Disable Auto Embed Script for WordPress 5.4+ – wp-embed.min.js

From the post body we can find the following code: <blockquote class=”wp-embedded-content” data-secret=”Gp5UKmVoxk”><a href=””>Cheap Glasses</a></blockquote> <iframe class=”wp-embedded-content” style=”position: absolute; clip: rect(1px, 1px, 1px, 1px);” title=”“Welcome” — Asia Actual” src=”” width=”600″ height=”338″ frameborder=”0″ marginwidth=”0″ marginheight=”0″ scrolling=”no” sandbox=”allow-scripts” data-secret=”Gp5UKmVoxk”></iframe> And we can find the following code at footer: <script src=’′></script> So we need 2 steps to remove […]

How to Redirect your 404 page to the Home Page in WordPress?

Go to the root of your template, check if there is 404.php or not. If you can not find this file, just create one, then edit  404.php, add the following code: <?php header(“HTTP/1.1 301 Moved Permanently”); header(“Location: “.get_bloginfo(‘url’)); exit(); ?> Done! Simple ? Yes! I have tested the code for

Remove all links in a post content of wordpress

Edit functions.php,  add the following code: add_filter(‘the_content’, ‘removelink_content’,1); function removelink_content($content = ”) { preg_match_all(“#<a(.*?)>(.*?)</a>#i”,$content, $matches); $num = count($matches[0]);for($i = 0;$i < $num;$i++){ $content = str_replace($matches[0][$i] , $matches[2][$i] , $content); } return $content; }

Get Next / Prev 3 Posts in Relation to Current Post of WordPress

I have 7 prescription eyeglasses posts, like this: 1 – How to buy eyeglasses online? 2 – Why so many people buy prescription glasses online? 3 – How come it saves so much shopping glasses online? 4 – this is the current post 5 – Do you know the importance of prescription sunglasses? 6 – […]

Creating Multiple Single Posts for Different Categories

If each post only belongs to one category, and each category has different post template, just modify single.php, we can use the following code: if ( in_category(‘fruit’) ) { include ‘single-fruit.php’; } elseif ( in_category(‘vegetables’) ) { include ‘single-vegetables.php’; } else { // Continue with normal Loop if ( have_posts() ) : while ( have_posts() […]

How to Change the “page” slug in Pagination of WordPress?

When pagination of is activated, the pagination URL will display as “” as default. How can we change the pagination to “”?

How to Let X-Cart Display latest WordPress Posts?

This mod assumes that you use the WordPress blogging software and uses the same database as your xcart software. If your wordpress and x-cart use separate database then use this code for blog_headlines.php

Adding custom text to bottom of all posts in particular category

If we want to add the same piece of custom text to the bottom of every post in a certain category of wordpress. How do then? For example, we want to add “Good idea if you buy eyeglasses online!” at each page of category which category id is 2. Try to add the following code […]