Showing posts with label change. Show all posts
Showing posts with label change. Show all posts
Monday, September 26, 2016
Thursday, June 26, 2014
Fix wordpress image urls in post on migration
Whenever we migrate wordpress from old domain to new domain we seldom encounter url errors where image urls in post do not get updated etc..
To Tackle this out here is a simple sql script
To Tackle this out here is a simple sql script
UPDATE wp_posts SET post_content = REPLACE (
post_content,
'olddomain.com/wp-content/',
'newdomain.com/wp-content/');
Tuesday, April 22, 2014
Change default wordpress login URL
Change default Login URL-Wordpress
Add the following line to the end of .htaccess
RewriteRule ^login$ http://YOUR_SITE.com/wp-login.php[NC,L]
Add the following line to the end of .htaccess
RewriteRule ^login$ http://YOUR_SITE.com/wp-login.php[NC,L]
Friday, November 29, 2013
Javascript-Fire event on resolution change
In the era of responsive websites sometimes it is needed to fire an event on change of resolution.
My designer was stuck in one such scenario and we sorted the same out as follows
My designer was stuck in one such scenario and we sorted the same out as follows
<script>
$(document).ready(function () {
var width = screen.width,
height = screen.height;
setInterval(function () {
if (screen.width !== width || screen.height !== height) {
width = screen.width;
height = screen.height;
$(window).trigger('resolutionchange');
}
}, 50);
}());
$(window).bind('resolutionchange', heightchanges)
function heightchanges(){
/*Your code on resolution change event here*/
}
});
</script>
Sunday, August 18, 2013
Cakephp-Refresh Auth Session information after a database change of current user
In order to update current user logged in Auth Session after a database change in his information in Users Table use the following command
$userid=$this->Auth->user('id');
$this->Session->write('Auth',$this->User->read(null,$userid));
That's it and your auth session is updated..
This is usually done once a user updates his information....
$userid=$this->Auth->user('id');
$this->Session->write('Auth',$this->User->read(null,$userid));
That's it and your auth session is updated..
This is usually done once a user updates his information....
Tuesday, April 2, 2013
Magento-Home Page-Store or Store View is not showing up-404 error: Page not found
Checklist :
1. Make sure the default store view of your defaut store of your default website is not disabled.
2. Flush your cache's
3. Reindex Data
4. Set Main website as default and and then set back your website as default.
The last option worked me with once I changed the Default store for my default website and did every thing till 7th point untill I hit and tried 8th one and it worked for me.
If this is not helping you need to debug the issue since it may either be your .htaccess issue or issue from index.php
Open the index.php in root directory of the Magento installation and comment the line
Mage::run($mageRunCode, $mageRunType);
(you will find this line near the end)
Run your website if you still find a 404 page not found error its an .htaccess issue try renaming the same
Else try this hardcode in index.php
Just above the code mentioned above type in the following code
/* Store or website code */
$mageRunCode = 'code of store view to load';
/* you will find the code field when you edit your store view type the same code exactly here */
/* Run store or run website */
$mageRunType ='store';
(make sure you type this just before the code line "Mage::run($mageRunCode, $mageRunType);" ) inorder to override default value of these variables
If you are able to open your store view here you need to go back and check store Management.
Post here if you further have any issues
1. Make sure the default store view of your defaut store of your default website is not disabled.
2. Flush your cache's
3. Reindex Data
4. Set Main website as default and and then set back your website as default.
The last option worked me with once I changed the Default store for my default website and did every thing till 7th point untill I hit and tried 8th one and it worked for me.
If this is not helping you need to debug the issue since it may either be your .htaccess issue or issue from index.php
Open the index.php in root directory of the Magento installation and comment the line
Mage::run($mageRunCode, $mageRunType);
(you will find this line near the end)
Run your website if you still find a 404 page not found error its an .htaccess issue try renaming the same
Else try this hardcode in index.php
Just above the code mentioned above type in the following code
/* Store or website code */
$mageRunCode = 'code of store view to load';
/* you will find the code field when you edit your store view type the same code exactly here */
/* Run store or run website */
$mageRunType ='store';
(make sure you type this just before the code line "Mage::run($mageRunCode, $mageRunType);" ) inorder to override default value of these variables
If you are able to open your store view here you need to go back and check store Management.
Post here if you further have any issues
Subscribe to:
Posts (Atom)