How To Fix Broken Image Links In WordPress Using phpMyAdmin?
July 22nd, 2016 | by Ravi Chahar || Leave a comment |
When you decide to change the URL of your website then in most of the case the images links get broken. You should know how to fix broken image links in WordPress site. After the migration of the WordPress or just by changing the domain name, you should update WordPress image URLs.
Sometimes, when you notice the broken links for the images of your website, you think that the network is slow to load the images. You should think again. It may happen because the path of the images is through the older domain or the older directory of the WordPress.
Fix Broken Image Links In WordPress through cPanel.
Though, you can use the plugins to update WordPress image URLs. But it’s better to use the cPanel and not rely on the plugins. While handling a WordPress blog, you should know all the possible ways to configure your website.
There are many plugins to use for every problem. But what would you do if you can’t able to login to your WordPress admin panel or the page keeps refreshing. Such type of problems can be handled using the cPanel.
In this post, I am going to show how to fix broken image links in WordPress without any plugin.
Update WordPress Image URLs.
Step 1:- Login to your cPanel and go to “phpMyAdmin” in the databases section.
Step 2:- From the left-hand-side menu, choose the database of your website. All the tables will be shown to you from which you have to select “wp_posts“.
Step 3:- After selecting it, click on the “SQL” option from the upper menu.
Step 4:- A new page will open to edit the SQL code. It is called as the SQL code editor where you can add the code of the SQL. In the box showing, you have to add a line of the SQL code to fix broken image links in WordPess.
UPDATE wp_posts SET post_content=(REPLACE (post-content, ‘<previous URL>’,'<present URL>’));
Step 5:- The final step is to click on the “Go” button after adding the code shown above in the SQL code editor.
You must note one thing. As I have shown in the code the previous URL and the present URL. It means that previous URL of your website or the domain name before changing and the present one is after changing the domain URL.
Now you have successfully added the code and you can the broken links of the images you had. To update WordPress image URLs, you don’t need to use any plugin now. Just the one line code can work fine.
Are You Ready To Fix Broken Image Links In WordPress?
Are you afraid to see the broken links for the images of your website? Don’t you know how to fix broken image links in WordPress? Do you want to update WordPress image URLs? Well, you won’t think like that after adding the code mentioned above. You know the rules, know the power of the cPanel provided by your web hosting company. You can do many things with it.
You can change the WordPress username and change the password. To solve the problem with any plugin can be solved by the cPanel. You can GZIP your website using the cPanel. I have shown you the demo as how to fix broken image links in WordPress.
You can solve every problem of your WordPress website using the cPanel. Though for beginners, it’s always recommended to use the plugins to solve the broken image links problem. If you displaced any line from the code then it won’t be good for your website. But still, it’s good to know different ways to solve the problems.