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 […]

Redirect HTTP to HTTPS in Nginx

Before we redirect all http to https in Nginx, we should have installed an SSL certificate successfully. server { listen 80 default_server; server_name _; return 301 https://$host$request_uri; } This listens on port 80. It’s also the port 80 default server. It’s assumed that it’s the only server block listening on port 80. The server_name is […]

How can I change the default product images sizes on Magento ver. 2.3.5-p1

Magento 2.3.5 uses the file called view.xml which is maintained at the theme level of the application. So for example, if you are using the default theme luma you should find the view.xml under vendor/magento/theme-frontend-luma/etc/view.xml In this file, you would see <images/> node inside the <media> node. public_html/ The dimension of the images is maintained […]

Invalid input datetime format of value: Magento ver. 2.3.5-p1

I have installed Magento ver. 2.3.5-p1 , the main shop is , I also have set up a USA shop, the domain name is I add a new product via , the product can be added, and display properly when I edit this product and save it, I got the wrong message: […]

Let’sEncrypt: It seems the CA server is busy now

Today I install the free ssl of Let’sEncrypt for, and meet the following error: It seems the CA server is busy now. I checked the installation error log and got the following information from curl: (35) SSL connect error When we use curl to visit https, nss is too old, so I upgrade […]

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 – […]

Converting Data from Latin1 to UTF-8

First export the databases which you plan to convert. $> mysqldump -u root -p123 –default-character-set=latin1 shop > /root/shop.sql Second, convert the database to utf8 $> sed -e ‘s/SET NAMES latin1/SET NAMES utf8/g’ -i /root/shop.sql $> sed -i -e ‘s/CHARSET=latin1/CHARSET=utf8 COLLATE=utf8_unicode_ci/g’ /root/shop.sql $> vi /root/shop.sql (Check the convention is successful or not) Last step, import the […]