I try to migrate my wordpress to new domain.(wordpres version 4.9.7)
The index.page is working, but other pages defined in wp_posts table not working properly.
like:
https://mysite.amazonaws.com/?page_id=622
I got 404 not find error.
I use apache2 with configuration:
<Directory /home/admin/www/html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
The .htaccess file is:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
the page editor part do not present the review page properly.
Anyone know where is the problem and how to fix it?
find the wp_options table, edit siteurl and home entries with the new url.
You can try in following order
Set the permalink to default(Plain ?p=ID) from wp-admin login page (http(s)://site.name/wp-admin/options-permalink.php)
If this works, then set the permalink to your desired format and try again.
Try disabling plugins.
If you domain is changed then you have to update the new website name in wp_options table. Refer to https://codex.wordpress.org/Changing_The_Site_URL
Refresh permalink fist after that.
Go to the WordPress backend where you have all pages and data from there you go inside "tool menu " and import all page and content.
After that
Go to another website where you want to migration
and export file which you import from the first WordPress backend
1st methord:
Go to file manager and you can remove the .htaccess file and again refresh the site URL.
2nd method:
Go to settings->permalinks and click the Save button to rewrite flush. And then hard reload the browser. It'll work hopefully.
3rd method:
Go to settings->permalinks edit your permalinks settings as "Custom Structure"
and edit like this /index.php/%postname%/
Related
I have uploaded WordPress website to a new server which is working fine. But Permalinks settings are not working. All other pages returning me 404 error.
and below in my .htaccess file
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
please check the apache module rewrite.
in a root wordpress folder insert into index.php phpinfo();
and find this string mod_rewrite. If it`s not, tell it your hoster support
To fix this error one can also try this method:
Open phpmyadmin > wordpress database > wp_options table
Here check first two fields and update option_value with correct WordPress location. After that reload the permalink, hopefully the error might gone
Go to "wp-admin", open settings->permalinks and update the permalink settings, it will update the .htaccess file on your server. Hard refresh your site, now all the links will be work perfectly.
there's a one tiny trick to update all links if you can access admin .
you just go to permalinks options from settings page and save permalinks to default and after saving it you may change again and update. This will work in most cases for me either its SSL based issue or urls mismatch. don't forget to view .htaccess file if you have old server and having multiple rewrites.
Im running a WordPress site with qTranslate installed.
The URLS are currently displayed as http://domain.com/en/ but i would like to change them to
http://en.domain.com
How do i make this work? qTranslate has a built-in pre-domain mode, which should do exactly what i need. But all it does is change the links (works), when visiting the page i get a 404 error.
In the admin it says "Pre-Path and Pre-Domain mode will only work with mod_rewrite/pretty permalinks. Additional Configuration is needed for Pre-Domain mode!"
I got pre-path working and i think im using pretty permalinks (/%category%/%postname%/), but ive got no idea what kind of 'additional configuration' is needed.
My .htaccess looks like this (i think standard wp output);
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
I tried a lot of different things found online, but i mostly get internal server errors or just the 404.
Thanks in advance!
If your default url starts with www (like www.domain.com) then your translated urls will look like en.www.domain.com.
But if you try to login en.domain.com, you may think that your plugin doesn't working.
Before try anything be sure that any subdomains shows your WordPress homepage. With default settings WordPress should not redirect to you anywhere.
Then set your default url without www prefix (for ex. domain.com)
And check the permalink finally
If you fail at any steps, disable all plugins and even change your theme to default one.
You'd have to add wildcard domain setting at your DNS settings for the domain. https://codex.wordpress.org/Configuring_Wildcard_Subdomains‎
Wildcard domain redirect with WordPress See also this post.
In wordpress, I have the wordpress files in a subdirectory, mywp, and originally the site's homepage was example.com/mywp/. I wanted to get of that /mywp/ in all the links, so I did the following:
Copied /mywp/index.php and /mywp/.htaccess FROM /mywp/ and pasted TO my root folder
Updated root's index.php, changed require('./mywp/wp-blog-header.php'); to require('./wp-blog-header.php'); (removed the /mywp/)
Updated the Site Url in wp admin's Settings - General FROM http://example.com/mywp TO http://example.com
After step 3, I visited http://example.com, and, the styles were off in both the site and the admin. I viewed source and all the css references were missing the /mywp/ in their url's.
In case someone asks, contents of my .htaccess file, that now resides in both my root and /mywp/ subdirectory are:
# Switch rewrite engine off in case this was installed under HostPay.
RewriteEngine Off
SetEnv DEFAULT_PHP_VERSION 5
DirectoryIndex index.cgi index.php
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /mywp/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /mywp/index.php [L]
</IfModule>
# END WordPress
Do I need to tweak another setting to get the styles right? And, do I have to remember this step if I ever update WordPress version or apply a new theme? Thanks!
Changing the Site URL There's four easy methods to change the Site URL manually. Any of these methods will work and perform much the same function.
I was changing the wrong record in the db! I was updating siteurl to be example.com instead of home.
Fix:
1. set siteurl in wp_options table to be http://example.com/mywp
2. set home in wp_options table to be http://example.com
3. still do the steps I have in the original description of this stackoverflow post
first off...thank you so much for your time.
I was referred to you guys and heard here's the best place to find a solution.
Ok...so here's the problem.
My old programmer set up the wordpress permalinks to be dynamic, but we all know that they are the worst to pull in traffic from search engines (specially google).
So I need an expert to set it to custom structure, which will show the words on the title on the URL or "URL friendly links" if you may.
I have some knowledge of computers/programming myself and so I tried to log in on our site's wordpress admin page, and change the permalinks to "custom structure": /%category%/%postname%/
Then also add the word : "categories" on the "category base" and "tag" on "tag base".
What happens however is that when we change that the url links are successfully changed, however...evertime you click on a category link, it takes you back to the main page of the site (instead of the category you chose). That also happens when you click on the pages menu on the site (at the bottom of the pages. ex: 1,2,3,4,5...) it doesn't take you to those pages instead, back to the main pages.
I think it's something that was done to the theme of the actual wodrpress, instead of the FTP, etc...
It might be something simple and fast, but I just can't seem to do it myself.
Edited to add:
By the way...forgot to mention. I already added this to my htaccess. file
RewriteEngine on
ErrorDocument 404 /404.shtml
# BEGIN WordPress
# END WordPress
RewriteCond %{HTTP_HOST} ^thehypebr.uol.virgula.com.br$ [OR]
RewriteCond %{HTTP_HOST} ^www.thehypebr.uol.virgula.com.br$
RewriteRule ^/?$ "http\:\/\/thehypebr\.com" [R=301,L]
then i deleted it all and only have:
# BEGIN WordPress
# END WordPress
Looks like the rewrite rules necessary for pretty urls were not added to your .htaccess files like they were supposed to (as you can see, the wordpress part is empty but it should not be).
Maybe the permissions on .htaccess were too tight. Try setting the permissions on your .htaccess file to be world-writable. Then switch back to dynamic urls, then back to custom structure. Theoretically, if permissions were the problem, wordpress will fill in the rules now. And then you can set the permissions on .htaccess back to normal.
When you log into the backend of Wordpress and go to your permalinks section try hitting the save button again. Once the page refreshes saying it saved it, scroll to the bottom of the page and there should be a paragraph telling you what the .htaccess file should have in it. ( It is usally a grey or yellow background paragraph ) Copy that and paste it into your .htaccess file instead of what you have now. This should help add the correct rules.
It usually looks like this:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
I am using apache server for work with wordpress...In my application; retrieving some values from user created table and displaying it.
when click on a product description which shows the full details of that product.ie,
http://localhost/demotile/?productid=59961
this url am following for get the details.here how can i rewrite the url as http://localhost/demotile/............please help me
If you login to wordpress dashboard, goto
Settings->Permalink
Change "Common settings" from default, select custom and input
/%postname%/
click "Save Changes"
if you get a message at the bottom of the page regarding your .htaccess file and not having permissions, you may have to create this file yourself.
open a new text file and copy/paste the info at the bottom of the screen, or copy this..
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
save this as ".htacess" {No filename - Just a Dot}
do this by saving the file with a name, then go to that file and hit F2 to rename,
delete the filename just before the {dot} and change any file extention at the end:
ie: "yourfile.txt" should then become ".htaccess"
upload this into the root of your website hosting folder.
ie: public_html
or www
or htmldocs
As long as mod re-write is enabled on your host this will produce the following url
http://yourblog.com/your_post_title_or_product
If you are using a custom Wordpress plugin then you may have to check see which permalink structure is in use...
to do this use the..
if ( get_option('permalink_structure') != '' ) { echo 'permalinks enabled' }
you may have to look into using htaccess to generate your nice urls..
perishablepress.com