RossMitchell
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: WordPress MenuWhen I watched your video, I did not see you trying to add pages or other items to the menu.
Suggest that you find a video showing how to create a menu.Forum: Fixing WordPress
In reply to: Could not copy fileSuggest that you ask in the plugin support forum.
Forum: Fixing WordPress
In reply to: WordPress Menu– You need to add some entries to the menu. These are in a list on the left.
– Remember to SAVE the menu.Forum: Fixing WordPress
In reply to: Can’t access “backend” – UrgentAs it probably would not cost much, it would be easiest to just renew the domain for another year. However maybe this is not possible.
As an alternative, you can on your computer map the domain name to your hosting server, this configuration will be local to and specific to just your computer, but is probably sufficient. You will need to know the IP address that your site is hosted at, your hosting support could help you here, say the address is a.b.c.d
Say your domain name is http://www.talweb.com
In your computer’s “host” file, add lines like:www.talweb.com a.b.c.d talweb.com a.b.c.dDetails on your hosts file here: https://en.wikipedia.org/wiki/Hosts_(file)
Beware that some browsers ignore the hosts file, in which case use a different browser or OS.Forum: Fixing WordPress
In reply to: Header block only shows correctly on hompage and in editorSuggest that you start again with no customisations.
Introduce your customisations one by one, at each step check your homepage and other pages, at which point does it go wrong ?Suggest that you seek support in the theme support forum.
This article: https://websitesetup.org/http-to-https-wordpress/
shows you the process, you have done most of this. You need to follow step 6, it tells you to add this blick to your .htaccess file:<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule>Put this OUTSIDE the begin/end WordPress block.
It redirects requests without https to use httpsForum: Localhost Installs
In reply to: Update Live site with Local changes ?It is possible of course to republish and launch your localhost site to live, just like when you made the site. However this is often found to be too heavy handed, the all of nothing aspect makes it too hard.
What is in my experience much better is to copy and paste the pages and posts that you developed on localhost, similarly for any changes you made to menus or widgets etc. It may seem inefficient to have to re-author your changes but for me it works out well. Of course since I know in advance I will be doing this, it encourages me to keep good notes of what I am doing.
Forum: Localhost Installs
In reply to: Site not the same as the last time i worked on itSince you last worked on the project something about your xampp system has changed.
– Is the database server running ?
– Can you see your WordPress database and tables in phpmyadmin ?
– Locate the WordPress files, especially your “wp-config.php” file, also your theme and plugins etc.
You need to get backups of your database and files.Forum: Localhost Installs
In reply to: Locally hosting wordpress site in virtual boxFirstly this is not a good idea, just about nobody does their own hosting. The security and uptime obligations are excessive. When considered in the scope of expenses, hosting is cheap.
If you really want to proceed then you will want to set port forwarding on your modem/router. Easiest if you have a static IP for your connection, though maybe a dynamic IP solution can work. Then you will have to configure your VM to have its Virtual Network adapter respond to a nominated IP on your LAN so that the router can forward to it.Forum: Developing with WordPress
In reply to: Php critical errorSeveral things:
– Inside a “script” block you do not use<?php, it is all assumeb to be PHP
– You are defining a function named “myfunction”, but the code will not be executed until the function is invoked. And then the variable “$src” is local to the function at the moment.
– note addition of various ; and other stuff.
– note that within double quote strings that php variable are replaced.
What you presumably need is more like, (NB: this may not work but is an improvement) :<script> $src = "needs to be set somehow"; function myfunction() { global $src; if(1+1=2) { $src= "myimg2.png"; } else { $src= "myimg.png"; } }; </script> <?php myfunction(); ?> <img width="60" class="image2" src="$src" />- This reply was modified 5 years, 11 months ago by RossMitchell.
Forum: Localhost Installs
In reply to: Moving local database to WAMPBarely a WordPress question.
What does Windows support say ?
What does MySql support say ?
What does WAMP support say ?Forum: Fixing WordPress
In reply to: Limit total successful login number / userOn some of my systems I record each login event, you could extend this code where indicated. The journal of login events will give you the information your will require to arbitrate the inevitable protests you will receive.
// Store timestamp of each user's login, record id, ip, time function rcd_last_login( $user_login, $user ) { global $wpdb; $lrec = 'INSERT INTO '.$table_prefix.'login_journal SET lg_id='.$user->ID.', lg_ip="'.$_SERVER['REMOTE_ADDR'].'", lg_date=NULL'; $results = $wpdb->query($lrec); if(empty($results)) { //this error should never happen echo '<p>Error recording user login.</p>'; } //at this point count the number of entries with this ID, if >= 10 (your limit) then update the users table to prevent further logins, this will happen at the start of their last session, maybe not ideal. } add_action( 'wp_login', 'rcd_last_login', 10, 2 );This is the SQL to create the custom table, (substitute your table prefix for <prefix>):
CREATE TABLE <prefix>login_journal ( lg_id bigint(20) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'wp user id', lg_ip varchar(16) CHARACTER SET utf8 DEFAULT NULL COMMENT 'ipv4 address', lg_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'date and time of last use' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Log of user logins'; ALTER TABLE <prefix>login_journal ADD PRIMARY KEY (lg_id,lg_date);- This reply was modified 5 years, 11 months ago by RossMitchell. Reason: code cleanup
Forum: Localhost Installs
In reply to: how can i run wordpress in localhost android?I did a google search on
android apache server
There are many results.
Not all solutions are free.
Some discussions are:
https://stackoverflow.com/questions/6571911/running-amp-apache-mysql-php-on-android
https://androidforums.com/threads/web-server-apache-mysql-php-for-android.1290067/Forum: Localhost Installs
In reply to: How can i merge live and local database versionsYour English is very good.
It is difficult to merge databases. Updating your website this way is probably not practical.
What I would do is to view each new post or page or product on your localhost, and copy paste it into your live site.Forum: Localhost Installs
In reply to: wordpress on ubuntu 18.04Can you ping ?